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