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