Class PostProcessor<TRequest, TState, TResponse>
inherit this class to create a post-processor with access to the common processor state of the endpoint.
Inherited Members
Namespace: FastEndpoints
Assembly: FastEndpoints.dll
Syntax
public abstract class PostProcessor<TRequest, TState, TResponse> : IPostProcessor<TRequest, TResponse>, IPostProcessor where TState : class, new()
Type Parameters
Name | Description |
---|---|
TRequest | type of the request DTO. |
TState | type of the common processor state. |
TResponse | type of the response. |
Methods
PostProcessAsync(IPostProcessorContext<TRequest, TResponse>, TState, CancellationToken)
implement this method to define the post-processing logic using the provided context and state.
Declaration
public abstract Task PostProcessAsync(IPostProcessorContext<TRequest, TResponse> context, TState state, CancellationToken ct)
Parameters
Type | Name | Description |
---|---|---|
IPostProcessorContext<TRequest, TResponse> | context | the context object encapsulating all necessary information for post-processing. |
TState | state | the common processor state object, derived from the HttpContext or newly instantiated. |
CancellationToken | ct | cancellation token. |
Returns
Type | Description |
---|---|
Task | a Task representing the asynchronous operation. |