gRPC C#
gRPC C#
Namespaces
Grpc.Core
ServerServiceDefinition.Builder Class
Builder Methods
AddMethod Method
AddMethod(TRequest, TResponse) Method (Method(TRequest, TResponse), ClientStreamingServerMethod(TRequest, TResponse))
AddMethod(TRequest, TResponse) Method (Method(TRequest, TResponse), DuplexStreamingServerMethod(TRequest, TResponse))
AddMethod(TRequest, TResponse) Method (Method(TRequest, TResponse), ServerStreamingServerMethod(TRequest, TResponse))
AddMethod(TRequest, TResponse) Method (Method(TRequest, TResponse), UnaryServerMethod(TRequest, TResponse))

ServerServiceDefinition Builder AddMethod TRequest, TResponse Method (Method TRequest, TResponse , ServerStreamingServerMethod TRequest, TResponse )

Adds a definitions for a server streaming method.

Namespace: Grpc.Core
Assembly: Grpc.Core (in Grpc.Core.dll) Version: 0.7.0.0
Syntax
C#
VB
C++
F#
Copy

    public ServerServiceDefinitionBuilder AddMethod<TRequest, TResponse>(
    	Method<TRequest, TResponse> method,
    	ServerStreamingServerMethod<TRequest, TResponse> handler
    )
    where TRequest : class
    where TResponse : class

    Public Function AddMethod(Of TRequest As Class, TResponse As Class) (
    	method As Method(Of TRequest, TResponse),
    	handler As ServerStreamingServerMethod(Of TRequest, TResponse)
    ) As ServerServiceDefinitionBuilder

    public:
    generic<typename TRequest, typename TResponse>
    where TRequest : ref class
    where TResponse : ref class
    ServerServiceDefinitionBuilder^ AddMethod(
    	Method<TRequest, TResponse>^ method,
    	ServerStreamingServerMethod<TRequest, TResponse>^ handler
    )

    member AddMethod :
            method : Method<'TRequest, 'TResponse> *
            handler : ServerStreamingServerMethod<'TRequest, 'TResponse> -> ServerServiceDefinitionBuilder  when 'TRequest : not struct when 'TResponse : not struct

#### Parameters

method
  Type: Grpc.Core
  Method
  TRequest, TResponse
  The method.
handler
  Type: Grpc.Core
  ServerStreamingServerMethod
  TRequest, TResponse
  The method handler.

#### Type Parameters

TRequest
  The request message class.
TResponse
  The response message class.

#### Return Value

Type: ServerServiceDefinition
Builder
This builder instance.
See Also

#### Reference

ServerServiceDefinition
Builder Class
AddMethod Overload
Grpc.Core Namespace