Interface IPostProcessor<TRequest, TResponse>
defines the generic interface for a post-processor with specific types for the request and response, enabling type-safe post-processing.
Namespace: FastEndpoints
Assembly: FastEndpoints.dll
Syntax
public interface IPostProcessor<in TRequest, in TResponse> : IPostProcessor
Type Parameters
Name | Description |
---|---|
TRequest | the type of the request object, which must be non-nullable. |
TResponse | the type of the response object. |
Methods
PostProcessAsync(IPostProcessorContext<TRequest, TResponse>, CancellationToken)
asynchronously performs post-processing on the provided context with specific request and response types.
Declaration
Task PostProcessAsync(IPostProcessorContext<in TRequest, in TResponse> context, CancellationToken ct)
Parameters
Type | Name | Description |
---|---|---|
IPostProcessorContext<TRequest, TResponse> | context | the post-processor context containing the typed request, response, 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 post-process operation. |