Interface IPreProcessor
defines the interface for a pre-processor that can perform asynchronous pre-processing tasks before a request has been handled.
Namespace: FastEndpoints
Assembly: FastEndpoints.dll
Syntax
public interface IPreProcessor
Methods
PreProcessAsync(IPreProcessorContext, CancellationToken)
asynchronously performs pre-processing on the provided context.
Declaration
Task PreProcessAsync(IPreProcessorContext context, CancellationToken ct)
Parameters
Type | Name | Description |
---|---|---|
IPreProcessorContext | context | the pre-processor context containing 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. |