18 references to AddResilienceHandler
Microsoft.Extensions.Http.Resilience.PerformanceTests (1)
RetryBenchmark.cs (1)
41
.
AddResilienceHandler
("my-retries", builder => builder.AddRetry(new HttpRetryStrategyOptions
Microsoft.Extensions.Http.Resilience.Tests (17)
Resilience\GrpcResilienceTests.cs (1)
76
var client = CreateClient(builder => builder.
AddResilienceHandler
("custom", builder => builder.AddTimeout(TimeSpan.FromSeconds(1))));
Resilience\HttpClientBuilderExtensionsTests.BySelector.cs (4)
33
.
AddResilienceHandler
("dummy", builder => builder.AddTimeout(TimeSpan.FromSeconds(1)))
50
var builder = _builder.
AddResilienceHandler
("dummy", builder => builder.AddTimeout(TimeSpan.FromSeconds(1))).SelectPipelineByAuthority();
72
.
AddResilienceHandler
("dummy", builder => builder.AddTimeout(TimeSpan.FromSeconds(1)))
119
.
AddResilienceHandler
("dummy", builder => builder.AddTimeout(TimeSpan.FromSeconds(1)))
Resilience\HttpClientBuilderExtensionsTests.Resilience.cs (12)
31
Assert.Throws<ArgumentNullException>(() => builder.
AddResilienceHandler
(null!, _ => { }));
32
Assert.Throws<ArgumentException>(() => builder.
AddResilienceHandler
(string.Empty, _ => { }));
35
Assert.Throws<ArgumentNullException>(() => builder.
AddResilienceHandler
("dummy", (Action<ResiliencePipelineBuilder<HttpResponseMessage>>)null!));
39
Assert.Throws<ArgumentNullException>(() => builder!.
AddResilienceHandler
("pipeline-name", _ => { }));
49
builder.
AddResilienceHandler
("test", ConfigureBuilder);
52
builder.
AddResilienceHandler
("test", ConfigureBuilder);
92
builder.
AddResilienceHandler
("test", ConfigureBuilder);
96
builder.
AddResilienceHandler
("test", ConfigureBuilder);
171
builder.
AddResilienceHandler
("test", ConfigureBuilder);
206
var pipelineBuilder = builder.
AddResilienceHandler
("dummy", ConfigureBuilder);
255
clientBuilder.
AddResilienceHandler
("my-pipeline", ConfigureBuilder);
280
.
AddResilienceHandler
("my-pipeline", ConfigureBuilder)