Search Results for

    Show / Hide Table of Contents

    Class RequestBinder<TRequest>

    the default request binder for a given request dto type

    Inheritance
    object
    RequestBinder<TRequest>
    Implements
    IRequestBinder<TRequest>
    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 RequestBinder<TRequest> : IRequestBinder<TRequest> where TRequest : notnull
    Type Parameters
    Name Description
    TRequest

    the type of the request dto this binder will be dealing with

    Constructors

    RequestBinder()

    default constructor which enables all binding sources

    Declaration
    public RequestBinder()

    RequestBinder(BindingSource)

    constructor accepting a bitwise combination of enums which enables only the specified binding sources

    Declaration
    public RequestBinder(BindingSource enabledSources)
    Parameters
    Type Name Description
    BindingSource enabledSources

    a bitwise combination of enum values

    Methods

    BindAsync(BinderContext, CancellationToken)

    override this method to customize the request binding logic

    Declaration
    public virtual ValueTask<TRequest> BindAsync(BinderContext ctx, CancellationToken ct)
    Parameters
    Type Name Description
    BinderContext ctx

    the request binder context which holds all the data required for binding the incoming request

    CancellationToken ct

    cancellation token

    Returns
    Type Description
    ValueTask<TRequest>
    Exceptions
    Type Condition
    ValidationFailureException

    thrown if any failures occur during the binding process

    Implements

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