Show / Hide Table of Contents

    Class ServiceMethodProviderContext<TService>

    A context for IServiceMethodProvider<TService>.

    Inheritance
    System.Object
    ServiceMethodProviderContext<TService>
    Namespace: Grpc.AspNetCore.Server.Model
    Assembly: Grpc.AspNetCore.Server.dll
    Syntax
    public class ServiceMethodProviderContext<TService> : object where TService : class
    Type Parameters
    Name Description
    TService

    Service type for the context.

    Methods

    AddClientStreamingMethod<TRequest, TResponse>(Method<TRequest, TResponse>, IList<Object>, ClientStreamingServerMethod<TService, TRequest, TResponse>)

    Adds a client streaming method to a service.

    Declaration
    public void AddClientStreamingMethod<TRequest, TResponse>(Method<TRequest, TResponse> method, IList<object> metadata, ClientStreamingServerMethod<TService, TRequest, TResponse> invoker)
        where TRequest : class where TResponse : class
    Parameters
    Type Name Description
    Method<TRequest, TResponse> method

    The method description.

    IList<System.Object> metadata

    The method metadata. This metadata can be used by routing and middleware when invoking a gRPC method.

    ClientStreamingServerMethod<TService, TRequest, TResponse> invoker

    The method invoker that is executed when the method is called.

    Type Parameters
    Name Description
    TRequest

    Request message type for this method.

    TResponse

    Response message type for this method.

    AddDuplexStreamingMethod<TRequest, TResponse>(Method<TRequest, TResponse>, IList<Object>, DuplexStreamingServerMethod<TService, TRequest, TResponse>)

    Adds a duplex streaming method to a service.

    Declaration
    public void AddDuplexStreamingMethod<TRequest, TResponse>(Method<TRequest, TResponse> method, IList<object> metadata, DuplexStreamingServerMethod<TService, TRequest, TResponse> invoker)
        where TRequest : class where TResponse : class
    Parameters
    Type Name Description
    Method<TRequest, TResponse> method

    The method description.

    IList<System.Object> metadata

    The method metadata. This metadata can be used by routing and middleware when invoking a gRPC method.

    DuplexStreamingServerMethod<TService, TRequest, TResponse> invoker

    The method invoker that is executed when the method is called.

    Type Parameters
    Name Description
    TRequest

    Request message type for this method.

    TResponse

    Response message type for this method.

    AddServerStreamingMethod<TRequest, TResponse>(Method<TRequest, TResponse>, IList<Object>, ServerStreamingServerMethod<TService, TRequest, TResponse>)

    Adds a server streaming method to a service.

    Declaration
    public void AddServerStreamingMethod<TRequest, TResponse>(Method<TRequest, TResponse> method, IList<object> metadata, ServerStreamingServerMethod<TService, TRequest, TResponse> invoker)
        where TRequest : class where TResponse : class
    Parameters
    Type Name Description
    Method<TRequest, TResponse> method

    The method description.

    IList<System.Object> metadata

    The method metadata. This metadata can be used by routing and middleware when invoking a gRPC method.

    ServerStreamingServerMethod<TService, TRequest, TResponse> invoker

    The method invoker that is executed when the method is called.

    Type Parameters
    Name Description
    TRequest

    Request message type for this method.

    TResponse

    Response message type for this method.

    AddUnaryMethod<TRequest, TResponse>(Method<TRequest, TResponse>, IList<Object>, UnaryServerMethod<TService, TRequest, TResponse>)

    Adds a unary method to a service.

    Declaration
    public void AddUnaryMethod<TRequest, TResponse>(Method<TRequest, TResponse> method, IList<object> metadata, UnaryServerMethod<TService, TRequest, TResponse> invoker)
        where TRequest : class where TResponse : class
    Parameters
    Type Name Description
    Method<TRequest, TResponse> method

    The method description.

    IList<System.Object> metadata

    The method metadata. This metadata can be used by routing and middleware when invoking a gRPC method.

    UnaryServerMethod<TService, TRequest, TResponse> invoker

    The method invoker that is executed when the method is called.

    Type Parameters
    Name Description
    TRequest

    Request message type for this method.

    TResponse

    Response message type for this method.

    Back to top Generated by DocFX