11 references to HttpClientResiliencePredicates
Microsoft.Extensions.Http.Resilience (5)
Hedging\HttpClientHedgingResiliencePredicates.cs (3)
28{ Result: { } response } when HttpClientResiliencePredicates.IsTransientHttpFailure(response) => true, 41=> HttpClientResiliencePredicates.IsHttpConnectionTimeout(outcome, cancellationToken) 54_ => HttpClientResiliencePredicates.IsTransientHttpException(exception),
Polly\HttpCircuitBreakerStrategyOptions.cs (1)
24ShouldHandle = args => new ValueTask<bool>(HttpClientResiliencePredicates.IsTransient(args.Outcome));
Polly\HttpRetryStrategyOptions.cs (1)
31ShouldHandle = args => new ValueTask<bool>(HttpClientResiliencePredicates.IsTransient(args.Outcome, args.Context.CancellationToken));
Microsoft.Extensions.Http.Resilience.Tests (6)
Polly\HttpClientResiliencePredicatesTests.cs (6)
29HttpClientResiliencePredicates.IsTransientHttpException(null!)); 36var isTransientHttpException = HttpClientResiliencePredicates.IsTransientHttpException(ex); 39isTransientHttpException = HttpClientResiliencePredicates.IsTransient(Outcome.FromException<HttpResponseMessage>(ex)); 56var isTransientFailure = HttpClientResiliencePredicates.IsTransientHttpFailure(response); 59isTransientFailure = HttpClientResiliencePredicates.IsTransient(Outcome.FromResult(response)); 68Assert.Throws<ArgumentNullException>(() => HttpClientResiliencePredicates.IsTransientHttpFailure(null!));