示例#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));
        }
示例#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);
 }