Search Results for

    Show / Hide Table of Contents

    Interface IPreProcessor<TRequest>

    defines the generic interface for a pre-processor with specific types for the request, enabling type-safe pre-processing.

    Inherited Members
    IPreProcessor.PreProcessAsync(IPreProcessorContext, CancellationToken)
    Namespace: FastEndpoints
    Assembly: FastEndpoints.dll
    Syntax
    public interface IPreProcessor<in TRequest> : IPreProcessor, IProcessor
    Type Parameters
    Name Description
    TRequest

    the type of the request object, which must be non-nullable.

    Methods

    PreProcessAsync(IPreProcessorContext<TRequest>, CancellationToken)

    asynchronously performs pre-processing on the provided context with a specific request type.

    Declaration
    Task PreProcessAsync(IPreProcessorContext<in TRequest> context, CancellationToken ct)
    Parameters
    Type Name Description
    IPreProcessorContext<TRequest> context

    the pre-processor context containing the typed request, and other processing details.

    CancellationToken ct

    The CancellationToken to observe while waiting for the task to complete.

    Returns
    Type Description
    Task

    a Task that represents the asynchronous pre-process operation.

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