protected override Task <HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { var executor = new RetryStrategyExecutor(request, _retryStrategy, cancellationToken); executor.Send = ResendHandler; return(ResendHandler(request, executor)); }
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); }