Interface IPostProcessor<TRequest, TResponse>
interface for defining post-processors to be executed after the main endpoint handler is done
Namespace: FastEndpoints
Assembly: FastEndpoints.dll
Syntax
public interface IPostProcessor<TRequest, TResponse>
Type Parameters
Name | Description |
---|---|
TRequest | the type of the request dto |
TResponse | the type of the response dto |
Methods
PostProcessAsync(TRequest, TResponse, HttpContext, IReadOnlyCollection<ValidationFailure>, CancellationToken)
this method is called with the given arguments when the post-processor executes.
Declaration
Task PostProcessAsync(TRequest req, TResponse res, HttpContext ctx, IReadOnlyCollection<ValidationFailure> failures, CancellationToken ct)
Parameters
Type | Name | Description |
---|---|---|
TRequest | req | the request dto object |
TResponse | res | the response dto object |
Microsoft.AspNetCore.Http.HttpContext | ctx | the current http context |
System.Collections.Generic.IReadOnlyCollection<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 |