Class PreProcessor<TRequest, TState>
inherit this class to create a pre-processor with access to the common processor state of the endpoint
Inheritance
System.Object
PreProcessor<TRequest, TState>
Implements
IPreProcessor<TRequest>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: FastEndpoints
Assembly: FastEndpoints.dll
Syntax
public abstract class PreProcessor<TRequest, TState> : IPreProcessor<TRequest> where TState : class, new()
Type Parameters
Name | Description |
---|---|
TRequest | type of the request dto |
TState | type of the common processor state |
Methods
PreProcessAsync(TRequest, TState, HttpContext, List<ValidationFailure>, CancellationToken)
this method is called with the given arguments when the pre-processor executes.
Declaration
public abstract Task PreProcessAsync(TRequest req, TState state, HttpContext ctx, List<ValidationFailure> failures, CancellationToken ct)
Parameters
Type | Name | Description |
---|---|---|
TRequest | req | the request dto object |
TState | state | the common processor state object |
Microsoft.AspNetCore.Http.HttpContext | ctx | the 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 |