<PackageReference Include="Grpc.Core.Api" Version="2.76.0" />

Grpc.Core.Method<TRequest, TResponse>

public class Method<TRequest, TResponse> : IMethod
A description of a remote method.
public string FullName { get; }

Gets the fully qualified name of the method. On the server side, methods are dispatched based on this name.

public string Name { get; }

Gets the unqualified name of the method.

public Marshaller<TRequest> RequestMarshaller { get; }

Gets the marshaller used for request messages.

public Marshaller<TResponse> ResponseMarshaller { get; }

Gets the marshaller used for response messages.

public string ServiceName { get; }

Gets the name of the service to which this method belongs.

public MethodType Type { get; }

Gets the type of the method.

public Method(MethodType type, string serviceName, string name, Marshaller<TRequest> requestMarshaller, Marshaller<TResponse> responseMarshaller)

Initializes a new instance of the Method class.