Class MethodDescriptor (3.15.8)

public sealed class MethodDescriptor : DescriptorBase, IDescriptor

Describes a single method in a service.

Inheritance

Object > DescriptorBase > MethodDescriptor

Implements

IDescriptor

Namespace

Google.Protobuf.Reflection

Assembly

Google.Protobuf.dll

Properties

CustomOptions

public CustomOptions CustomOptions { get; }

The (possibly empty) set of custom options for this method.

Property Value
TypeDescription
CustomOptions

InputType

public MessageDescriptor InputType { get; }
Property Value
TypeDescription
MessageDescriptor

The method's input type.

IsClientStreaming

public bool IsClientStreaming { get; }
Property Value
TypeDescription
Boolean

Indicates if client streams multiple requests.

IsServerStreaming

public bool IsServerStreaming { get; }
Property Value
TypeDescription
Boolean

Indicates if server streams multiple responses.

Name

public override string Name { get; }

The brief name of the descriptor's target.

Property Value
TypeDescription
String
Overrides

OutputType

public MessageDescriptor OutputType { get; }
Property Value
TypeDescription
MessageDescriptor

The method's input type.

Service

public ServiceDescriptor Service { get; }
Property Value
TypeDescription
ServiceDescriptor

The service this method belongs to.

Methods

GetOption<T>(Extension<MethodOptions, T>)

public T GetOption<T>(Extension<MethodOptions, T> extension)

Gets a single value method option for this descriptor

Parameter
NameDescription
extensionExtension<MethodOptions, T>
Returns
TypeDescription
T
Type Parameter
NameDescription
T

GetOption<T>(RepeatedExtension<MethodOptions, T>)

public RepeatedField<T> GetOption<T>(RepeatedExtension<MethodOptions, T> extension)

Gets a repeated value method option for this descriptor

Parameter
NameDescription
extensionRepeatedExtension<MethodOptions, T>
Returns
TypeDescription
RepeatedField<T>
Type Parameter
NameDescription
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.

Returns
TypeDescription
MethodOptions