예제 #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);
예제 #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);
예제 #3
0
 Task IRequestExceptionHandler <TRequest, TResponse, TException> .Handle(TRequest request, TException exception, RequestExceptionHandlerState <TResponse> state, CancellationToken cancellationToken)
 {
     Handle(request, exception, state);
     return(Task.CompletedTask);
 }
예제 #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);
 }