共用方式為


SocketsHttpHandlerBuilderExtensions.Configure 方法

定義

多載

Configure(ISocketsHttpHandlerBuilder, IConfiguration)

用來IConfiguration設定具名 HttpClient的主要 SocketsHttpHandler

Configure(ISocketsHttpHandlerBuilder, Action<SocketsHttpHandler,IServiceProvider>)

新增將用來設定具名 HttpClient 之主要 SocketsHttpHandler 的委派。

Configure(ISocketsHttpHandlerBuilder, IConfiguration)

來源:
SocketsHttpHandlerBuilderExtensions.cs
來源:
SocketsHttpHandlerBuilderExtensions.cs
來源:
SocketsHttpHandlerBuilderExtensions.cs
來源:
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>)

來源:
SocketsHttpHandlerBuilderExtensions.cs
來源:
SocketsHttpHandlerBuilderExtensions.cs
來源:
SocketsHttpHandlerBuilderExtensions.cs
來源:
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,可用來設定處理程式。

屬性

適用於