1 write to _builder
Microsoft.Extensions.Http.Resilience.Tests (1)
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (1)
31
_builder
= new ServiceCollection().AddHttpClient(BuilderName);
22 references to _builder
Microsoft.Extensions.Http.Resilience.Tests (22)
Resilience\HttpClientBuilderExtensionsTests.BySelector.cs (15)
28
_builder
.Services.AddFakeRedaction();
31
_builder
.AddStandardResilienceHandler().SelectPipelineByAuthority().PipelineName :
32
_builder
36
var provider =
_builder
.Services.BuildServiceProvider().GetPipelineKeyProvider(pipelineName)!;
49
_builder
.Services.AddFakeRedaction();
50
var builder =
_builder
.AddResilienceHandler("dummy", builder => builder.AddTimeout(TimeSpan.FromSeconds(1))).SelectPipelineByAuthority();
65
_builder
.Services.AddFakeRedaction();
71
pipelineName =
_builder
77
pipelineName =
_builder
82
var provider =
_builder
.Services.BuildServiceProvider().GetPipelineKeyProvider(pipelineName)!;
113
_builder
.Services.AddFakeRedaction();
114
_builder
.Services.TryAddSingleton(provider.Object);
118
pipelineName =
_builder
124
pipelineName =
_builder
129
_builder
.AddHttpMessageHandler(() => new TestHandlerStub(HttpStatusCode.OK));
Resilience\HttpClientBuilderExtensionsTests.Resilience.cs (2)
148
_builder
158
_builder
.AddHttpMessageHandler(() => new TestHandlerStub(HttpStatusCode.InternalServerError));
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (5)
32
_builder
.Services.AddMetrics();
33
_builder
.Services.AddLogging();
59
_serviceProvider ??=
_builder
.Services.BuildServiceProvider();
236
_builder
.AddStandardResilienceHandler().Configure(config).Configure(options =>
242
_builder
.AddHttpMessageHandler(() => new TestHandlerStub((r, _) =>