Interface IPipelineBehavior<TRequest, TResponse>
- Namespace
- Mediarion
- Assembly
- Mediarion.dll
Wraps the handling of a request: logging, validation, a transaction, a retry.
public interface IPipelineBehavior<in TRequest, TResponse> where TRequest : notnull
Type Parameters
TRequestThe request this wraps, or a base of it.
TResponseWhat the request answers with.
Remarks
Behaviours run in the order they are registered, outermost first, and the handler is innermost. A behaviour that does not call the next step short-circuits everything below it, which is how a cache or a guard is written.
Methods
- Handle(TRequest, RequestHandlerDelegate<TResponse>, CancellationToken)
Runs around the rest of the pipeline.