Table of Contents

Class RequestPostProcessorBehavior<TRequest, TResponse>

Namespace
Caesar.Pipeline
Assembly
Caesar.dll

Runs every registered IRequestPostProcessor<TRequest, TResponse> after the handler. Registered automatically by AddCaesar when at least one post-processor exists.

public sealed class RequestPostProcessorBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> where TRequest : notnull

Type Parameters

TRequest

The request type.

TResponse

The response type.

Inheritance
RequestPostProcessorBehavior<TRequest, TResponse>
Implements
IPipelineBehavior<TRequest, TResponse>
Inherited Members

Constructors

RequestPostProcessorBehavior(IEnumerable<IRequestPostProcessor<TRequest, TResponse>>)

Creates the behavior.

public RequestPostProcessorBehavior(IEnumerable<IRequestPostProcessor<TRequest, TResponse>> postProcessors)

Parameters

postProcessors IEnumerable<IRequestPostProcessor<TRequest, TResponse>>

The post-processors to run, in registration order.

Methods

Handle(TRequest, RequestHandlerDelegate<TResponse>, CancellationToken)

Handles the request, calling next to continue the pipeline.

public Task<TResponse> Handle(TRequest request, RequestHandlerDelegate<TResponse> next, CancellationToken cancellationToken)

Parameters

request TRequest

The request.

next RequestHandlerDelegate<TResponse>

Continues the pipeline. Not calling it short-circuits the request.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<TResponse>