9 references to DisableFor
Microsoft.Extensions.Http.Resilience (1)
Polly\HttpRetryStrategyOptionsExtensions.cs (1)
31
options.
DisableFor
(
Microsoft.Extensions.Http.Resilience.Tests (8)
Polly\HttpRetryStrategyOptionsExtensionsTests.cs (8)
18
Assert.Throws<ArgumentNullException>(() => ((HttpRetryStrategyOptions)null!).
DisableFor
(HttpMethod.Get));
24
Assert.Throws<ArgumentNullException>(() => new HttpRetryStrategyOptions().
DisableFor
(null!));
30
Assert.Throws<ArgumentException>(() => new HttpRetryStrategyOptions().
DisableFor
([]));
37
Assert.Throws<ArgumentException>(() => options.
DisableFor
(HttpMethod.Get));
47
options.
DisableFor
(HttpMethod.Post, HttpMethod.Delete);
59
options.
DisableFor
(HttpMethod.Post);
71
options.
DisableFor
(HttpMethod.Post);
80
options.
DisableFor
(HttpMethod.Post);