SocketsHttpHandlerBuilderExtensions.Configure Method

Definition

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)

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

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

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>)

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

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

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

Applies to