Ejemplo n.º 1
0
 /// <summary>
 /// Override in a derived class for the handler logic
 /// </summary>
 /// <param name="request">Failed request</param>
 /// <param name="exception">The thrown exception</param>
 /// <param name="state">The current state of handling the exception</param>
 protected abstract void Handle(TRequest request, TException exception, RequestExceptionHandlerState <TResponse> state);
Ejemplo n.º 2
0
 /// <summary>
 /// Override in a derived class for the handler logic
 /// </summary>
 /// <param name="request">Failed request</param>
 /// <param name="exception">The thrown exception</param>
 /// <param name="state">The current state of handling the exception</param>
 /// <param name="cancellationToken">Cancellation token</param>
 protected abstract Task Handle(TRequest request, Exception exception, RequestExceptionHandlerState <TResponse> state, CancellationToken cancellationToken);
Ejemplo n.º 3
0
 Task IRequestExceptionHandler <TRequest, TResponse, TException> .Handle(TRequest request, TException exception, RequestExceptionHandlerState <TResponse> state, CancellationToken cancellationToken)
 {
     Handle(request, exception, state);
     return(Task.CompletedTask);
 }
Ejemplo n.º 4
0
 async Task IRequestExceptionHandler <TRequest, TResponse, Exception> .Handle(TRequest request, Exception exception, RequestExceptionHandlerState <TResponse> state, CancellationToken cancellationToken)
 {
     await Handle(request, exception, state, cancellationToken).ConfigureAwait(false);
 }