Class RequestExceptionActionProcessorBehavior<TRequest, TResponse>
Runs every matching IRequestExceptionAction<TRequest, TException> when the inner pipeline throws, most specific exception type first, then rethrows the original exception.
public sealed class RequestExceptionActionProcessorBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> where TRequest : notnull
Type Parameters
TRequestThe request type.
TResponseThe response type.
- Inheritance
-
RequestExceptionActionProcessorBehavior<TRequest, TResponse>
- Implements
-
IPipelineBehavior<TRequest, TResponse>
- Inherited Members
Constructors
RequestExceptionActionProcessorBehavior(IServiceProvider)
Creates the behavior.
public RequestExceptionActionProcessorBehavior(IServiceProvider serviceProvider)
Parameters
serviceProviderIServiceProviderProvider used to resolve exception actions.
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
requestTRequestThe request.
nextRequestHandlerDelegate<TResponse>Continues the pipeline. Not calling it short-circuits the request.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<TResponse>