Search Results for

    Show / Hide Table of Contents

    Class CommandMiddlewareConfig

    command middleware configuration

    Inheritance
    object
    CommandMiddlewareConfig
    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.dll
    Syntax
    public class CommandMiddlewareConfig

    Methods

    Register(params Type[])

    register one or more open-generic command middleware pieces in the order you'd like them registered.

    c.Register(typeof(CommandLogger<,>), typeof(CommandValidator<,>));
    Declaration
    public void Register(params Type[] middlewareTypes)
    Parameters
    Type Name Description
    Type[] middlewareTypes

    the open-generic middleware types to add to the pipeline.

    Exceptions
    Type Condition
    ArgumentException

    thrown if any of the supplied types are not open-generic.

    Register<TCommand, TResult, TMiddleware>()

    register a closed-generic command middleware in the pipeline.

    Declaration
    public void Register<TCommand, TResult, TMiddleware>() where TCommand : ICommand<TResult> where TMiddleware : ICommandMiddleware<TCommand, TResult>
    Type Parameters
    Name Description
    TCommand

    the type of the command

    TResult

    the type of the result

    TMiddleware

    the type of the middleware

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