Class GlobalPreProcessor<TState>
inherit this class to create a global pre-processor with access to the common processor state of the endpoint
Inherited Members
Namespace: FastEndpoints
Assembly: FastEndpoints.dll
Syntax
public abstract class GlobalPreProcessor<TState> : IGlobalPreProcessor, IPreProcessor where TState : class, new()
Type Parameters
Name | Description |
---|---|
TState | type of the common processor state |
Methods
PreProcessAsync(IPreProcessorContext, TState, CancellationToken)
this method is called with the given arguments when the pre-processor executes.
Declaration
public abstract Task PreProcessAsync(IPreProcessorContext context, TState state, CancellationToken ct)
Parameters
Type | Name | Description |
---|---|---|
IPreProcessorContext | context | the context object encapsulating all necessary information for pre-processing. |
TState | state | the common processor state object |
CancellationToken | ct | cancellation token |
Returns
Type | Description |
---|---|
Task |