ConfigurationExtensions.GetAzureClientSettings Method

Definition

Overloads

Name Description
GetAzureClientSettings<T>(IConfiguration, String)

Creates an instance of T and sets its properties from the specified IConfiguration.

GetAzureClientSettings<T>(IConfiguration, String, CredentialResolver[])

Creates an instance of T and sets its properties from the specified IConfiguration. The bound settings' TokenProvider is resolved via the supplied CredentialResolver chain together with a built-in AzureCredentialResolver appended to the end of the chain (so caller-supplied resolvers take precedence).

GetAzureClientSettings<T>(IConfiguration, String, IEnumerable<CredentialResolver>, Action<IConfigurationSection>)

Creates an instance of T from the named configuration section, applying configureOverrides to the credential section before resolution. The bound settings' TokenProvider is resolved via the supplied CredentialResolver chain together with a built-in AzureCredentialResolver appended to the end of the chain (so caller-supplied resolvers take precedence).

GetAzureClientSettings<T>(IConfiguration, String)

Source:
ConfigurationExtensions.cs
Source:
ConfigurationExtensions.cs

Creates an instance of T and sets its properties from the specified IConfiguration.

public static T GetAzureClientSettings<T>(this Microsoft.Extensions.Configuration.IConfiguration configuration, string sectionName) where T : System.ClientModel.Primitives.ClientSettings, new();
static member GetAzureClientSettings : Microsoft.Extensions.Configuration.IConfiguration * string -> 'T (requires 'T :> System.ClientModel.Primitives.ClientSettings and 'T : (new : unit -> 'T))
<Extension()>
Public Function GetAzureClientSettings(Of T As {ClientSettingsNew}) (configuration As IConfiguration, sectionName As String) As T

Type Parameters

T

The type of ClientSettings to create.

Parameters

configuration
IConfiguration

The IConfiguration to bind the properties of T from.

sectionName
String

The section of IConfiguration to bind from.

Returns

T

Applies to

GetAzureClientSettings<T>(IConfiguration, String, CredentialResolver[])

Source:
ConfigurationExtensions.cs

Creates an instance of T and sets its properties from the specified IConfiguration. The bound settings' TokenProvider is resolved via the supplied CredentialResolver chain together with a built-in AzureCredentialResolver appended to the end of the chain (so caller-supplied resolvers take precedence).

public static T GetAzureClientSettings<T>(this Microsoft.Extensions.Configuration.IConfiguration configuration, string sectionName, params System.ClientModel.Primitives.CredentialResolver[] resolvers) where T : System.ClientModel.Primitives.ClientSettings, new();
static member GetAzureClientSettings : Microsoft.Extensions.Configuration.IConfiguration * string * System.ClientModel.Primitives.CredentialResolver[] -> 'T (requires 'T :> System.ClientModel.Primitives.ClientSettings and 'T : (new : unit -> 'T))
<Extension()>
Public Function GetAzureClientSettings(Of T As {ClientSettingsNew}) (configuration As IConfiguration, sectionName As String, ParamArray resolvers As CredentialResolver()) As T

Type Parameters

T

The type of ClientSettings to create.

Parameters

configuration
IConfiguration

The IConfiguration to bind the properties of T from.

sectionName
String

The section of IConfiguration to bind from.

resolvers
CredentialResolver[]

Caller-supplied resolvers, evaluated in order before the built-in AzureCredentialResolver is consulted.

Returns

T

Applies to

GetAzureClientSettings<T>(IConfiguration, String, IEnumerable<CredentialResolver>, Action<IConfigurationSection>)

Source:
ConfigurationExtensions.cs

Creates an instance of T from the named configuration section, applying configureOverrides to the credential section before resolution. The bound settings' TokenProvider is resolved via the supplied CredentialResolver chain together with a built-in AzureCredentialResolver appended to the end of the chain (so caller-supplied resolvers take precedence).

public static T GetAzureClientSettings<T>(this Microsoft.Extensions.Configuration.IConfiguration configuration, string sectionName, System.Collections.Generic.IEnumerable<System.ClientModel.Primitives.CredentialResolver> resolvers, Action<Microsoft.Extensions.Configuration.IConfigurationSection> configureOverrides) where T : System.ClientModel.Primitives.ClientSettings, new();
static member GetAzureClientSettings : Microsoft.Extensions.Configuration.IConfiguration * string * seq<System.ClientModel.Primitives.CredentialResolver> * Action<Microsoft.Extensions.Configuration.IConfigurationSection> -> 'T (requires 'T :> System.ClientModel.Primitives.ClientSettings and 'T : (new : unit -> 'T))
<Extension()>
Public Function GetAzureClientSettings(Of T As {ClientSettingsNew}) (configuration As IConfiguration, sectionName As String, resolvers As IEnumerable(Of CredentialResolver), configureOverrides As Action(Of IConfigurationSection)) As T

Type Parameters

T

The type of ClientSettings to create.

Parameters

configuration
IConfiguration

The IConfiguration to bind the properties of T from.

sectionName
String

The section of IConfiguration to bind from.

resolvers
IEnumerable<CredentialResolver>

Caller-supplied resolvers, evaluated in order before the built-in AzureCredentialResolver is consulted.

configureOverrides
Action<IConfigurationSection>

Callback invoked against a writable overlay of the credential section, allowing properties to be added or overridden before resolution. The Azure OpenAI default-scope quirk is applied first when applicable, so callers may override it if needed.

Returns

T

Applies to