17 instantiations of HttpRetryStrategyOptions
Microsoft.Extensions.Http.Resilience (1)
Resilience\HttpStandardResilienceOptions.cs (1)
66public HttpRetryStrategyOptions Retry { get; set; } = new HttpRetryStrategyOptions
Microsoft.Extensions.Http.Resilience.PerformanceTests (1)
RetryBenchmark.cs (1)
41.AddResilienceHandler("my-retries", builder => builder.AddRetry(new HttpRetryStrategyOptions
Microsoft.Extensions.Http.Resilience.Tests (15)
Polly\HttpRetryStrategyOptionsExtensionsTests.cs (8)
24Assert.Throws<ArgumentNullException>(() => new HttpRetryStrategyOptions().DisableFor(null!)); 30Assert.Throws<ArgumentException>(() => new HttpRetryStrategyOptions().DisableFor([])); 36var options = new HttpRetryStrategyOptions { ShouldHandle = null! }; 46var options = new HttpRetryStrategyOptions { ShouldHandle = _ => PredicateResult.True() }; 58var options = new HttpRetryStrategyOptions { ShouldHandle = _ => PredicateResult.False() }; 70var options = new HttpRetryStrategyOptions { ShouldHandle = _ => PredicateResult.True() }; 79var options = new HttpRetryStrategyOptions { ShouldHandle = _ => PredicateResult.True() }; 99var options = new HttpRetryStrategyOptions { ShouldHandle = _ => PredicateResult.True() };
Polly\HttpRetryStrategyOptionsTests.cs (7)
32private readonly HttpRetryStrategyOptions _testClass = new(); 37var options = new HttpRetryStrategyOptions(); 84var isTransientFailure = await new HttpRetryStrategyOptions().ShouldHandle(CreateArgs(Outcome.FromResult(response))); 94var shouldHandle = await new HttpRetryStrategyOptions().ShouldHandle(args); 101var options = new HttpRetryStrategyOptions { ShouldRetryAfterHeader = true }; 129var options = new HttpRetryStrategyOptions { ShouldRetryAfterHeader = true }; 151var options = new HttpRetryStrategyOptions
19 references to HttpRetryStrategyOptions
Microsoft.Extensions.Http.Resilience (6)
Polly\HttpRetryStrategyOptions.cs (1)
22/// Initializes a new instance of the <see cref="HttpRetryStrategyOptions"/> class.
Polly\HttpRetryStrategyOptionsExtensions.cs (3)
15/// Extensions for <see cref="HttpRetryStrategyOptions"/>. 29public static void DisableForUnsafeHttpMethods(this HttpRetryStrategyOptions options) 45public static void DisableFor(this HttpRetryStrategyOptions options, params HttpMethod[] methods)
Resilience\HttpStandardResilienceOptions.cs (2)
62/// By default, this property is initialized with a unique instance of <see cref="HttpRetryStrategyOptions"/> using default properties values. 66public HttpRetryStrategyOptions Retry { get; set; } = new HttpRetryStrategyOptions
Microsoft.Extensions.Http.Resilience.Tests (13)
Polly\HttpRetryStrategyOptionsExtensionsTests.cs (7)
18Assert.Throws<ArgumentNullException>(() => ((HttpRetryStrategyOptions)null!).DisableFor(HttpMethod.Get)); 36var options = new HttpRetryStrategyOptions { ShouldHandle = null! }; 46var options = new HttpRetryStrategyOptions { ShouldHandle = _ => PredicateResult.True() }; 58var options = new HttpRetryStrategyOptions { ShouldHandle = _ => PredicateResult.False() }; 70var options = new HttpRetryStrategyOptions { ShouldHandle = _ => PredicateResult.True() }; 79var options = new HttpRetryStrategyOptions { ShouldHandle = _ => PredicateResult.True() }; 99var options = new HttpRetryStrategyOptions { ShouldHandle = _ => PredicateResult.True() };
Polly\HttpRetryStrategyOptionsTests.cs (5)
32private readonly HttpRetryStrategyOptions _testClass = new(); 37var options = new HttpRetryStrategyOptions(); 101var options = new HttpRetryStrategyOptions { ShouldRetryAfterHeader = true }; 129var options = new HttpRetryStrategyOptions { ShouldRetryAfterHeader = true }; 151var options = new HttpRetryStrategyOptions
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (1)
172descriptor.Strategies[2].Options.Should().BeOfType<HttpRetryStrategyOptions>();