Language

ConfigurationExtensions Class

Definition

Provides extension methods for IConfiguration interface.

public static class ConfigurationExtensions
type ConfigurationExtensions = class
Public Module ConfigurationExtensions
Inheritance
ConfigurationExtensions

Methods

Name Description
AddAzureClient(IHostApplicationBuilder, String, Action)

Adds a singleton Azure client of the specified type to the IHostApplicationBuilder's service collection.

AddAzureClient(IHostApplicationBuilder, String)

Adds a singleton Azure client of the specified type to the IHostApplicationBuilder's service collection.

AddAzureCredentialResolver(IHostApplicationBuilder)

Registers AzureCredentialResolver on the host's service collection. Idempotent — repeated calls do not produce duplicate registrations.

AddAzureCredentialResolver(IServiceCollection)

Registers AzureCredentialResolver in the service collection. Idempotent — repeated calls do not produce duplicate registrations.

AddKeyedAzureClient(IHostApplicationBuilder, String, String, Action)

Adds a keyed singleton Azure client of the specified type to the IHostApplicationBuilder's service collection.

AddKeyedAzureClient(IHostApplicationBuilder, String, String)

Adds a keyed singleton Azure client of the specified type to the IHostApplicationBuilder's service collection.

GetAzureClientSettings(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(IConfiguration, String, IEnumerable, Action)

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(IConfiguration, String)

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

GetAzureCredentialSettings(IConfiguration, String, CredentialResolver[])

Returns the CredentialSettings bound from the named credential section. Caller-supplied resolvers are evaluated in order; the built-in AzureCredentialResolver is appended to the chain as a fallback. The first resolver to claim the section populates TokenProvider.

GetAzureCredentialSettings(IConfiguration, String, IEnumerable, Action)

Returns the CredentialSettings bound from the named credential section, applying configureOverrides to the credential section before resolving. Caller-supplied resolvers are evaluated in order; the built-in AzureCredentialResolver is appended to the chain as a fallback.

GetAzureCredentialSettings(IConfiguration, String)

Returns the CredentialSettings bound from the named credential section, with TokenProvider populated by the built-in AzureCredentialResolver when it claims the section.

WithAzureCredential(IClientBuilder)

Registers a credential factory to return a TokenCredential to use for the current IClientBuilder. If the same credential configuration has already been registered, the existing credential instance is reused.

WithAzureCredential(T)

Sets the CredentialProvider to an instance of TokenCredential.

Applies to