<PackageReference Include="Google.Protobuf" Version="3.34.1" />

Google.Protobuf.Reflection.MethodDescriptor

public sealed class MethodDescriptor : DescriptorBase
Describes a single method in a service.
public CustomOptions CustomOptions { get; }

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

public MessageDescriptor InputType { get; }

public bool IsClientStreaming { get; }

public bool IsServerStreaming { get; }

public MessageDescriptor OutputType { get; }

public ServiceDescriptor Service { get; }

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

Gets a single value method option for this descriptor

Gets a repeated value method option for this descriptor

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 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.