ConfigurationExtensions Class

Definition

Extension methods for configuration classes.

public ref class ConfigurationExtensions abstract sealed
public static class ConfigurationExtensions
type ConfigurationExtensions = class
Public Module ConfigurationExtensions
Inheritance
ConfigurationExtensions

Methods

Add<TSource>(IConfigurationBuilder, Action<TSource>)

Adds a new configuration source.

AddUserSecrets(IConfigurationBuilder)

Adds the user secrets configuration source. Searches the assembly from GetEntryAssembly() for an instance of UserSecretsIdAttribute.

AddUserSecrets(IConfigurationBuilder, Assembly)

Adds the user secrets configuration source.

AddUserSecrets(IConfigurationBuilder, String)

Adds the user secrets configuration source with specified secrets id.

AddUserSecrets<T>(IConfigurationBuilder)

Adds the user secrets configuration source. Searches the assembly that contains type T for an instance of UserSecretsIdAttribute.

AsEnumerable(IConfiguration)

Get the enumeration of key value pairs within the IConfiguration

AsEnumerable(IConfiguration, Boolean)

Get the enumeration of key value pairs within the IConfiguration

Exists(IConfigurationSection)

Determines whether the section has a Value or has children.

GetConnectionString(IConfiguration, String)

Shorthand for GetSection("ConnectionStrings")[name].

Applies to