Example #1
0
        protected override Task <HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
        {
            var executor = new RetryStrategyExecutor(request, _retryStrategy, cancellationToken);

            executor.Send = ResendHandler;
            return(ResendHandler(request, executor));
        }
Example #2
0
 private Task <HttpResponseMessage> ResendHandler(HttpRequestMessage request, RetryStrategyExecutor executor)
 {
     return(base.SendAsync(request, executor.Token)
            .ContinueWith(t => HandleTransientErrors(t, executor), executor.Token)
            .Unwrap());
 }
 private Task<HttpResponseMessage> ResendHandler(HttpRequestMessage request, RetryStrategyExecutor executor)
 {
     return base.SendAsync(request, executor.Token)
         .ContinueWith(t => HandleTransientErrors(t, executor), executor.Token)
         .Unwrap();
 }
 protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
 {
     var executor = new RetryStrategyExecutor(request, _retryStrategy, cancellationToken);
     executor.Send = ResendHandler;
     return ResendHandler(request, executor);
 }