Class BindServiceMethodAttribute (2.48.0)

public class BindServiceMethodAttribute : Attribute

Specifies the location of the service bind method for a gRPC service. The bind method is typically generated code and is used to register a service's methods with the server on startup.

The bind method signature takes a ServiceBinderBase and an optional instance of the service base class, e.g. static void BindService(ServiceBinderBase, GreeterService).

Inheritance

Object > BindServiceMethodAttribute

Namespace

Grpc.Core

Assembly

Grpc.Core.Api.dll

Constructors

BindServiceMethodAttribute(Type, String)

public BindServiceMethodAttribute(Type bindType, string bindMethodName)

Initializes a new instance of the BindServiceMethodAttribute class.

Parameters
Name Description
bindType Type

The type the service bind method is defined on.

bindMethodName String

The name of the service bind method.

Properties

BindMethodName

public string BindMethodName { get; }

Gets the name of the service bind method.

Property Value
Type Description
String

BindType

public Type BindType { get; }

Gets the type the service bind method is defined on.

Property Value
Type Description
Type