Class ConcurrencyRetryBehavior<TRequest, TResponse\>
Namespace: Common.Behaviors
Assembly: Common.dll
public class ConcurrencyRetryBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> where TRequest : IRequest<TResponse>, IRetryable
Type Parameters
TRequest
TResponse
Inheritance
object ← ConcurrencyRetryBehavior<TRequest, TResponse\>
Implements
IPipelineBehavior<TRequest, TResponse\>
Inherited Members
object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.MemberwiseClone\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)
Constructors
ConcurrencyRetryBehavior\(ILogger<ConcurrencyRetryBehavior<TRequest, TResponse\>\>\)
public ConcurrencyRetryBehavior(ILogger<ConcurrencyRetryBehavior<TRequest, TResponse>> logger)
Parameters
logger ILogger
Methods
Handle\(TRequest, RequestHandlerDelegate<TResponse\>, CancellationToken\)
Pipeline handler. Perform any additional behavior and await the next delegate as necessary
public Task<TResponse> Handle(TRequest request, RequestHandlerDelegate<TResponse> next, CancellationToken cancellationToken)
Parameters
request TRequest
Incoming request
next RequestHandlerDelegate<TResponse\>
Awaitable delegate for the next action in the pipeline. Eventually this delegate represents the handler.
cancellationToken CancellationToken
Cancellation token
Returns
Task <TResponse\>
Awaitable task returning the TResponse
Last modified: 21 May 2024