[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public class BindServiceMethodAttribute : AttributeSpecifies 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).
Namespace
Grpc.CoreAssembly
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 |
TypeThe type the service bind method is defined on. |
bindMethodName |
stringThe 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 |
|