HttpClientBuilderExtensions.RemoveAsKeyed(IHttpClientBuilder) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
删除命名 HttpClient 和 HttpMessageHandler的密钥注册。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ RemoveAsKeyed(Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ builder);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder RemoveAsKeyed (this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder);
static member RemoveAsKeyed : Microsoft.Extensions.DependencyInjection.IHttpClientBuilder -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder
<Extension()>
Public Function RemoveAsKeyed (builder As IHttpClientBuilder) As IHttpClientBuilder
参数
- builder
- IHttpClientBuilder
返回
可用于配置客户端的 IHttpClientBuilder。
注解
如果与 ConfigureHttpClientDefaults(IServiceCollection, Action<IHttpClientBuilder>)一起使用,它只会影响以前的“全局”AnyKey 注册,并且不会影响注册到具有 AddAsKeyed(IHttpClientBuilder, ServiceLifetime)的特定名称的客户端。