ConfigurationExtensions.AddAzureClient 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
| Name | Description |
|---|---|
| AddAzureClient<TClient,TSettings>(IHostApplicationBuilder, String) |
Adds a singleton Azure client of the specified type to the IHostApplicationBuilder's service collection. |
| AddAzureClient<TClient,TSettings>(IHostApplicationBuilder, String, Action<TSettings>) |
Adds a singleton Azure client of the specified type to the IHostApplicationBuilder's service collection. |
AddAzureClient<TClient,TSettings>(IHostApplicationBuilder, String)
- Source:
- ConfigurationExtensions.cs
- Source:
- ConfigurationExtensions.cs
Adds a singleton Azure client of the specified type to the IHostApplicationBuilder's service collection.
public static System.ClientModel.Primitives.IClientBuilder AddAzureClient<TClient,TSettings>(this Microsoft.Extensions.Hosting.IHostApplicationBuilder host, string sectionName) where TClient : class where TSettings : System.ClientModel.Primitives.ClientSettings, new();
public static Microsoft.Extensions.Hosting.IHostApplicationBuilder AddAzureClient<TClient,TSettings>(this Microsoft.Extensions.Hosting.IHostApplicationBuilder host, string sectionName) where TClient : class where TSettings : System.ClientModel.Primitives.ClientSettings, new();
static member AddAzureClient : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string -> System.ClientModel.Primitives.IClientBuilder (requires 'Client : null and 'Settings :> System.ClientModel.Primitives.ClientSettings and 'Settings : (new : unit -> 'Settings))
static member AddAzureClient : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string -> Microsoft.Extensions.Hosting.IHostApplicationBuilder (requires 'Client : null and 'Settings :> System.ClientModel.Primitives.ClientSettings and 'Settings : (new : unit -> 'Settings))
<Extension()>
Public Function AddAzureClient(Of TClient As Class, TSettings As Class) (host As IHostApplicationBuilder, sectionName As String) As IClientBuilder
<Extension()>
Public Function AddAzureClient(Of TClient As Class, TSettings As Class) (host As IHostApplicationBuilder, sectionName As String) As IHostApplicationBuilder
Type Parameters
- TClient
The type of Azure client.
- TSettings
The type of ClientSettings.
Parameters
The IHostApplicationBuilder to add to.
- sectionName
- String
The section of IConfiguration to use.
Returns
Applies to
AddAzureClient<TClient,TSettings>(IHostApplicationBuilder, String, Action<TSettings>)
- Source:
- ConfigurationExtensions.cs
- Source:
- ConfigurationExtensions.cs
Adds a singleton Azure client of the specified type to the IHostApplicationBuilder's service collection.
public static System.ClientModel.Primitives.IClientBuilder AddAzureClient<TClient,TSettings>(this Microsoft.Extensions.Hosting.IHostApplicationBuilder host, string sectionName, Action<TSettings> configureSettings) where TClient : class where TSettings : System.ClientModel.Primitives.ClientSettings, new();
public static Microsoft.Extensions.Hosting.IHostApplicationBuilder AddAzureClient<TClient,TSettings>(this Microsoft.Extensions.Hosting.IHostApplicationBuilder host, string sectionName, Action<TSettings> configureSettings) where TClient : class where TSettings : System.ClientModel.Primitives.ClientSettings, new();
static member AddAzureClient : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string * Action<'Settings (requires 'Settings :> System.ClientModel.Primitives.ClientSettings and 'Settings : (new : unit -> 'Settings))> -> System.ClientModel.Primitives.IClientBuilder (requires 'Client : null and 'Settings :> System.ClientModel.Primitives.ClientSettings and 'Settings : (new : unit -> 'Settings))
static member AddAzureClient : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string * Action<'Settings (requires 'Settings :> System.ClientModel.Primitives.ClientSettings and 'Settings : (new : unit -> 'Settings))> -> Microsoft.Extensions.Hosting.IHostApplicationBuilder (requires 'Client : null and 'Settings :> System.ClientModel.Primitives.ClientSettings and 'Settings : (new : unit -> 'Settings))
<Extension()>
Public Function AddAzureClient(Of TClient As Class, TSettings As Class) (host As IHostApplicationBuilder, sectionName As String, configureSettings As Action(Of TSettings)) As IClientBuilder
<Extension()>
Public Function AddAzureClient(Of TClient As Class, TSettings As Class) (host As IHostApplicationBuilder, sectionName As String, configureSettings As Action(Of TSettings)) As IHostApplicationBuilder
Type Parameters
- TClient
The type of Azure client.
- TSettings
The type of ClientSettings.
Parameters
The IHostApplicationBuilder to add to.
- sectionName
- String
The section of IConfiguration to use.
- configureSettings
- Action<TSettings>
Factory method to modify the TSettings after they are created.