Class BindServiceMethodAttribute (2.66.0)

  [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] 
 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 > Attribute > 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

BindType

 public Type BindType { get; } 

Gets the type the service bind method is defined on.

Property Value
Type
Description
Design a Mobile Site
View Site in Mobile | Classic
Share by: