Search Results for

    Show / Hide Table of Contents

    Class HandlerServerExtensions

    gRPC handler server extensions

    Inheritance
    object
    HandlerServerExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: FastEndpoints
    Assembly: FastEndpoints.Messaging.Remote.dll
    Syntax
    public static class HandlerServerExtensions

    Methods

    AddHandlerServer(WebApplicationBuilder, Action<GrpcServiceOptions>?)

    configure the handler server which will host a collection of command handlers and event hubs. this should only be called once per application.

    IMPORTANT: specify which handlers/hubs this server will be hosting via MapHandlers<TStorageRecord, TStorageProvider>(IEndpointRouteBuilder, Action<HandlerOptions<TStorageRecord, TStorageProvider>>) method.

    Declaration
    public static IGrpcServerBuilder AddHandlerServer(this WebApplicationBuilder bld, Action<GrpcServiceOptions>? o = null)
    Parameters
    Type Name Description
    WebApplicationBuilder bld
    Action<GrpcServiceOptions> o

    optional grpc service settings

    Returns
    Type Description
    IGrpcServerBuilder

    AddHandlerServer(IServiceCollection, Action<GrpcServiceOptions>?)

    configure the handler server which will host a collection of command handlers. this should only be called once per application.

    IMPORTANT: specify which handlers this server will be hosting via MapHandlers<TStorageRecord, TStorageProvider>(IEndpointRouteBuilder, Action<HandlerOptions<TStorageRecord, TStorageProvider>>) method.

    Declaration
    public static IGrpcServerBuilder AddHandlerServer(this IServiceCollection sc, Action<GrpcServiceOptions>? o = null)
    Parameters
    Type Name Description
    IServiceCollection sc
    Action<GrpcServiceOptions> o

    optional grpc service settings

    Returns
    Type Description
    IGrpcServerBuilder

    MapHandlers(IEndpointRouteBuilder, Action<HandlerOptions<InMemoryEventStorageRecord, InMemoryEventHubStorage>>)

    specify which handlers/event hubs this server will be hosting. the in-memory storage provider will be used.

    Declaration
    public static IEndpointRouteBuilder MapHandlers(this IEndpointRouteBuilder b, Action<HandlerOptions<InMemoryEventStorageRecord, InMemoryEventHubStorage>> h)
    Parameters
    Type Name Description
    IEndpointRouteBuilder b
    Action<HandlerOptions<InMemoryEventStorageRecord, InMemoryEventHubStorage>> h

    handler options

    Returns
    Type Description
    IEndpointRouteBuilder

    MapHandlers<TStorageRecord, TStorageProvider>(IEndpointRouteBuilder, Action<HandlerOptions<TStorageRecord, TStorageProvider>>)

    specify which handlers/event hubs this server will be hosting together with a custom storage provider

    Declaration
    public static IEndpointRouteBuilder MapHandlers<TStorageRecord, TStorageProvider>(this IEndpointRouteBuilder b, Action<HandlerOptions<TStorageRecord, TStorageProvider>> h) where TStorageRecord : class, IEventStorageRecord, new() where TStorageProvider : class, IEventHubStorageProvider<TStorageRecord>
    Parameters
    Type Name Description
    IEndpointRouteBuilder b
    Action<HandlerOptions<TStorageRecord, TStorageProvider>> h

    handler options

    Returns
    Type Description
    IEndpointRouteBuilder
    Type Parameters
    Name Description
    TStorageRecord

    the type of the event storage record

    TStorageProvider

    the type of the event storage provider

    In this article
    Back to top Developed by Đĵ ΝιΓΞΗΛψΚ and contributors / Licensed under MIT / Website generated by DocFX