SocketsHttpHandlerBuilderExtensions.Configure 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Configure(ISocketsHttpHandlerBuilder, IConfiguration)
用來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,可用來設定處理程式。
- 屬性
備註
只會剖析 、int
、 Enum或 TimeSpan 類型的bool
屬性SocketsHttpHandler。
中 IConfiguration 所有不相符的屬性都會被忽略。
適用於
Configure(ISocketsHttpHandlerBuilder, Action<SocketsHttpHandler,IServiceProvider>)
新增將用來設定具名 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,可用來設定處理程式。
- 屬性