Background and motivation
Re: Microsoft.Extensions.Http.Resilience, Microsoft.Extensions.DependencyInjection
So HttpKey is currently not a public API member. When registering resilience handlers on an IHttpClientBuilder using the AddResilienceHandler extension, it creates an HttpResiliencePipelineBuilder by calling AddHttpResiliencePipeline<HttpKey, HttpResponseMessage>.
AFAICT all documentation that deals with "advanced" scenarios, like executing a pipeline using ExecuteAsync with a given ResilienceContext, requires a ResiliencePipelineProvider or ResiliencePipelineRegistry with a key type of string. When using DI to request such a provider, it is not currently possible to reference a type of ResiliencePipelineProvider<HttpKey> because HttpKey is an internal type.
API Proposal
internal readonly record struct HttpKey(string Name, string InstanceName)
should be
public readonly record struct HttpKey(string Name, string InstanceName)
API Usage
ResiliencePipelineProvider<HttpKey> theRegisteredProvider,
Alternative Designs
Provide guidance on how to accomplish advanced scenarios when using AddResilienceHandler
Risks
No response
Background and motivation
Re: Microsoft.Extensions.Http.Resilience, Microsoft.Extensions.DependencyInjection
So
HttpKeyis currently not a public API member. When registering resilience handlers on anIHttpClientBuilderusing theAddResilienceHandlerextension, it creates anHttpResiliencePipelineBuilderby callingAddHttpResiliencePipeline<HttpKey, HttpResponseMessage>.AFAICT all documentation that deals with "advanced" scenarios, like executing a pipeline using
ExecuteAsyncwith a givenResilienceContext, requires aResiliencePipelineProviderorResiliencePipelineRegistrywith a key type ofstring. When using DI to request such a provider, it is not currently possible to reference a type ofResiliencePipelineProvider<HttpKey>becauseHttpKeyis an internal type.API Proposal
should be
API Usage
Alternative Designs
Provide guidance on how to accomplish advanced scenarios when using
AddResilienceHandlerRisks
No response