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)
24
ShouldHandle = args => new ValueTask<bool>(
HttpClientResiliencePredicates
.IsTransient(args.Outcome));
Polly\HttpRetryStrategyOptions.cs (1)
31
ShouldHandle = args => new ValueTask<bool>(
HttpClientResiliencePredicates
.IsTransient(args.Outcome, args.Context.CancellationToken));
Microsoft.Extensions.Http.Resilience.Tests (6)
Polly\HttpClientResiliencePredicatesTests.cs (6)
29
HttpClientResiliencePredicates
.IsTransientHttpException(null!));
36
var isTransientHttpException =
HttpClientResiliencePredicates
.IsTransientHttpException(ex);
39
isTransientHttpException =
HttpClientResiliencePredicates
.IsTransient(Outcome.FromException<HttpResponseMessage>(ex));
56
var isTransientFailure =
HttpClientResiliencePredicates
.IsTransientHttpFailure(response);
59
isTransientFailure =
HttpClientResiliencePredicates
.IsTransient(Outcome.FromResult(response));
68
Assert.Throws<ArgumentNullException>(() =>
HttpClientResiliencePredicates
.IsTransientHttpFailure(null!));