SocketsHttpHandlerBuilderExtensions.Configure Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Configure(ISocketsHttpHandlerBuilder, IConfiguration) |
Uses IConfiguration to configure the primary SocketsHttpHandler for a named HttpClient. |
Configure(ISocketsHttpHandlerBuilder, Action<SocketsHttpHandler,IServiceProvider>) |
Adds a delegate that will be used to configure the primary SocketsHttpHandler for a named HttpClient. |
Configure(ISocketsHttpHandlerBuilder, IConfiguration)
Uses IConfiguration to configure the primary SocketsHttpHandler for a named HttpClient.
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
Parameters
- builder
- ISocketsHttpHandlerBuilder
- configuration
- IConfiguration
Configuration containing properties of SocketsHttpHandler.
Returns
An ISocketsHttpHandlerBuilder that can be used to configure the handler.
- Attributes
Remarks
Only simple (of type `bool`, `int`, Enum or TimeSpan) properties of SocketsHttpHandler will be parsed.
All unmatched properties in IConfiguration will be ignored.
Applies to
Configure(ISocketsHttpHandlerBuilder, Action<SocketsHttpHandler,IServiceProvider>)
Adds a delegate that will be used to configure the primary SocketsHttpHandler for a named HttpClient.
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
Parameters
- builder
- ISocketsHttpHandlerBuilder
- configure
- Action<SocketsHttpHandler,IServiceProvider>
A delegate that is used to modify a SocketsHttpHandler.
Returns
An ISocketsHttpHandlerBuilder that can be used to configure the handler.
- Attributes