SocketsHttpHandlerBuilderExtensions.Configure 方法

定义

重载

Configure(ISocketsHttpHandlerBuilder, IConfiguration)

使用 IConfiguration 为名为 HttpClient的 配置主SocketsHttpHandler数据库。

Configure(ISocketsHttpHandlerBuilder, Action<SocketsHttpHandler,IServiceProvider>)

添加一个委托,该委托将为已命名的 HttpClient 配置主要 SocketsHttpHandler

Configure(ISocketsHttpHandlerBuilder, IConfiguration)

Source:
SocketsHttpHandlerBuilderExtensions.cs
Source:
SocketsHttpHandlerBuilderExtensions.cs
Source:
SocketsHttpHandlerBuilderExtensions.cs
Source:
SocketsHttpHandlerBuilderExtensions.cs

使用 IConfiguration 为名为 HttpClient的 配置主SocketsHttpHandler数据库。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::ISocketsHttpHandlerBuilder ^ Configure(Microsoft::Extensions::DependencyInjection::ISocketsHttpHandlerBuilder ^ builder, Microsoft::Extensions::Configuration::IConfiguration ^ configuration);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static Microsoft.Extensions.DependencyInjection.ISocketsHttpHandlerBuilder Configure (this Microsoft.Extensions.DependencyInjection.ISocketsHttpHandlerBuilder builder, Microsoft.Extensions.Configuration.IConfiguration configuration);
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member Configure : Microsoft.Extensions.DependencyInjection.ISocketsHttpHandlerBuilder * Microsoft.Extensions.Configuration.IConfiguration -> Microsoft.Extensions.DependencyInjection.ISocketsHttpHandlerBuilder
<Extension()>
Public Function Configure (builder As ISocketsHttpHandlerBuilder, configuration As IConfiguration) As ISocketsHttpHandlerBuilder

参数

configuration
IConfiguration

包含 属性的配置 SocketsHttpHandler

返回

ISocketsHttpHandlerBuilder可用于配置处理程序的 。

属性

注解

仅分析 、intEnumTimeSpan 类型的bool属性SocketsHttpHandler

IConfiguration 所有不匹配的属性将被忽略。

适用于

Configure(ISocketsHttpHandlerBuilder, Action<SocketsHttpHandler,IServiceProvider>)

Source:
SocketsHttpHandlerBuilderExtensions.cs
Source:
SocketsHttpHandlerBuilderExtensions.cs
Source:
SocketsHttpHandlerBuilderExtensions.cs
Source:
SocketsHttpHandlerBuilderExtensions.cs

添加一个委托,该委托将为已命名的 HttpClient 配置主要 SocketsHttpHandler

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::ISocketsHttpHandlerBuilder ^ Configure(Microsoft::Extensions::DependencyInjection::ISocketsHttpHandlerBuilder ^ builder, Action<System::Net::Http::SocketsHttpHandler ^, IServiceProvider ^> ^ configure);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static Microsoft.Extensions.DependencyInjection.ISocketsHttpHandlerBuilder Configure (this Microsoft.Extensions.DependencyInjection.ISocketsHttpHandlerBuilder builder, Action<System.Net.Http.SocketsHttpHandler,IServiceProvider> configure);
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member Configure : Microsoft.Extensions.DependencyInjection.ISocketsHttpHandlerBuilder * Action<System.Net.Http.SocketsHttpHandler, IServiceProvider> -> Microsoft.Extensions.DependencyInjection.ISocketsHttpHandlerBuilder
<Extension()>
Public Function Configure (builder As ISocketsHttpHandlerBuilder, configure As Action(Of SocketsHttpHandler, IServiceProvider)) As ISocketsHttpHandlerBuilder

参数

configure
Action<SocketsHttpHandler,IServiceProvider>

用于修改 的 SocketsHttpHandler委托。

返回

ISocketsHttpHandlerBuilder可用于配置处理程序的 。

属性

适用于