Interface IPreProcessor<TRequest>
interface for defining pre-processors to be executed before the main endpoint handler is called
Namespace: FastEndpoints
Assembly: FastEndpoints.dll
Syntax
public interface IPreProcessor<TRequest>
Type Parameters
Name | Description |
---|---|
TRequest | the type of the request dto |
Methods
PreProcessAsync(TRequest, HttpContext, List<ValidationFailure>, CancellationToken)
this method is called with the given arguments when the pre-processor executes.
Declaration
Task PreProcessAsync(TRequest req, HttpContext ctx, List<ValidationFailure> failures, CancellationToken ct)
Parameters
Type | Name | Description |
---|---|---|
TRequest | req | the request dto object |
Microsoft.AspNetCore.Http.HttpContext | ctx | the current http context |
System.Collections.Generic.List<FluentValidation.Results.ValidationFailure> | failures | the collection of validation errors of the endpoint |
System.Threading.CancellationToken | ct | cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |