Send feedback
Class MethodDescriptor (3.23.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 3.23.0 keyboard_arrow_down
public sealed class MethodDescriptor : DescriptorBase, IDescriptor
Describes a single method in a service.
Namespace
Google.Protobuf.Reflection
Assembly
Google.Protobuf.dll
Properties
CustomOptions
[Obsolete("CustomOptions are obsolete. Use the GetOptions() method.")]
public CustomOptions CustomOptions { get; }
The (possibly empty) set of custom options for this method.
public MessageDescriptor InputType { get; }
IsClientStreaming
public bool IsClientStreaming { get; }
Property Value
Type
Description
bool
Indicates if client streams multiple requests.
IsServerStreaming
public bool IsServerStreaming { get; }
Property Value
Type
Description
bool
Indicates if server streams multiple responses.
Name
public override string Name { get; }
The brief name of the descriptor's target.
Property Value
Type
Description
string
Overrides
OutputType
public MessageDescriptor OutputType { get; }
Service
public ServiceDescriptor Service { get; }
Property Value
Type
Description
ServiceDescriptor
The service this method belongs to.
Methods
GetOption<T>(Extension<MethodOptions, T>)
[Obsolete("GetOption is obsolete. Use the GetOptions() method.")]
public T GetOption<T>(Extension<MethodOptions, T> extension)
Gets a single value method option for this descriptor
Returns
Type
Description
T
Type Parameter
Name
Description
T
GetOption<T>(RepeatedExtension<MethodOptions, T>)
[Obsolete("GetOption is obsolete. Use the GetOptions() method.")]
public RepeatedField<T> GetOption<T>(RepeatedExtension<MethodOptions, T> extension)
Gets a repeated value method option for this descriptor
Type Parameter
Name
Description
T
GetOptions()
public MethodOptions GetOptions()
The MethodOptions
, defined in descriptor.proto
.
If the options message is not present (i.e. there are no options), null
is returned.
Custom options can be retrieved as extensions of the returned message.
NOTE: A defensive copy is created each time this property is retrieved.
ToProto()
public MethodDescriptorProto ToProto()
Returns a clone of the underlying MethodDescriptorProto describing this method.
Note that a copy is taken every time this method is called, so clients using it frequently
(and not modifying it) may want to cache the returned value.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-10 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-09-10 UTC."}