Show / Hide Table of Contents

Class Method<TRequest, TResponse>

A description of a remote method.

Inheritance
System.Object
Method<TRequest, TResponse>
Implements
IMethod
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Grpc.Core
Assembly: Grpc.Core.Api.dll
Syntax
public class Method<TRequest, TResponse> : IMethod
Type Parameters
Name Description
TRequest

Request message type for this method.

TResponse

Response message type for this method.

Constructors

Method(MethodType, String, String, Marshaller<TRequest>, Marshaller<TResponse>)

Initializes a new instance of the Method class.

Declaration
public Method(MethodType type, string serviceName, string name, Marshaller<TRequest> requestMarshaller, Marshaller<TResponse> responseMarshaller)
Parameters
Type Name Description
MethodType type

Type of method.

System.String serviceName

Name of service this method belongs to.

System.String name

Unqualified name of the method.

Marshaller<TRequest> requestMarshaller

Marshaller used for request messages.

Marshaller<TResponse> responseMarshaller

Marshaller used for response messages.

Properties

FullName

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

Declaration
public string FullName { get; }
Property Value
Type Description
System.String
Implements
IMethod.FullName

Name

Gets the unqualified name of the method.

Declaration
public string Name { get; }
Property Value
Type Description
System.String
Implements
IMethod.Name

RequestMarshaller

Gets the marshaller used for request messages.

Declaration
public Marshaller<TRequest> RequestMarshaller { get; }
Property Value
Type Description
Marshaller<TRequest>

ResponseMarshaller

Gets the marshaller used for response messages.

Declaration
public Marshaller<TResponse> ResponseMarshaller { get; }
Property Value
Type Description
Marshaller<TResponse>

ServiceName

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

Declaration
public string ServiceName { get; }
Property Value
Type Description
System.String
Implements
IMethod.ServiceName

Type

Gets the type of the method.

Declaration
public MethodType Type { get; }
Property Value
Type Description
MethodType
Implements
IMethod.Type
Back to top