IConfigurationBuilder IConfigurationBuilder IConfigurationBuilder Interface

Definition

Represents a type used to build application configuration.

public interface IConfigurationBuilder
type IConfigurationBuilder = interface
Public Interface IConfigurationBuilder
Derived

Properties

Properties Properties Properties

Gets a key/value collection that can be used to share data between the IConfigurationBuilder and the registered IConfigurationSources.

Sources Sources Sources

Gets the sources used to obtain configuration values

Methods

Add(IConfigurationSource) Add(IConfigurationSource) Add(IConfigurationSource)

Adds a new configuration source.

Build() Build() Build()

Builds an IConfiguration with keys and values from the set of sources registered in Sources.

Extension Methods

AddAzureKeyVault(IConfigurationBuilder, String) AddAzureKeyVault(IConfigurationBuilder, String) AddAzureKeyVault(IConfigurationBuilder, String)

Adds an IConfigurationProvider that reads configuration values from the Azure KeyVault.

AddAzureKeyVault(IConfigurationBuilder, String, KeyVaultClient, IKeyVaultSecretManager) AddAzureKeyVault(IConfigurationBuilder, String, KeyVaultClient, IKeyVaultSecretManager) AddAzureKeyVault(IConfigurationBuilder, String, KeyVaultClient, IKeyVaultSecretManager)

Adds an IConfigurationProvider that reads configuration values from the Azure KeyVault.

AddAzureKeyVault(IConfigurationBuilder, String, IKeyVaultSecretManager) AddAzureKeyVault(IConfigurationBuilder, String, IKeyVaultSecretManager) AddAzureKeyVault(IConfigurationBuilder, String, IKeyVaultSecretManager)

Adds an IConfigurationProvider that reads configuration values from the Azure KeyVault.

AddAzureKeyVault(IConfigurationBuilder, String, String, X509Certificate2) AddAzureKeyVault(IConfigurationBuilder, String, String, X509Certificate2) AddAzureKeyVault(IConfigurationBuilder, String, String, X509Certificate2)

Adds an IConfigurationProvider that reads configuration values from the Azure KeyVault.

AddAzureKeyVault(IConfigurationBuilder, String, String, X509Certificate2, IKeyVaultSecretManager) AddAzureKeyVault(IConfigurationBuilder, String, String, X509Certificate2, IKeyVaultSecretManager) AddAzureKeyVault(IConfigurationBuilder, String, String, X509Certificate2, IKeyVaultSecretManager)

Adds an IConfigurationProvider that reads configuration values from the Azure KeyVault.

AddAzureKeyVault(IConfigurationBuilder, String, String, String) AddAzureKeyVault(IConfigurationBuilder, String, String, String) AddAzureKeyVault(IConfigurationBuilder, String, String, String)

Adds an IConfigurationProvider that reads configuration values from the Azure KeyVault.

AddAzureKeyVault(IConfigurationBuilder, String, String, String, IKeyVaultSecretManager) AddAzureKeyVault(IConfigurationBuilder, String, String, String, IKeyVaultSecretManager) AddAzureKeyVault(IConfigurationBuilder, String, String, String, IKeyVaultSecretManager)

Adds an IConfigurationProvider that reads configuration values from the Azure KeyVault.

AddConfiguration(IConfigurationBuilder, IConfiguration) AddConfiguration(IConfigurationBuilder, IConfiguration) AddConfiguration(IConfigurationBuilder, IConfiguration)

Adds an existing configuration to configurationBuilder.

AddCommandLine(IConfigurationBuilder, Action<CommandLineConfigurationSource>) AddCommandLine(IConfigurationBuilder, Action<CommandLineConfigurationSource>) AddCommandLine(IConfigurationBuilder, Action<CommandLineConfigurationSource>)

Adds an IConfigurationProvider that reads configuration values from the command line.

AddCommandLine(IConfigurationBuilder, String[]) AddCommandLine(IConfigurationBuilder, String[]) AddCommandLine(IConfigurationBuilder, String[])

Adds a CommandLineConfigurationProviderIConfigurationProvider that reads configuration values from the command line.

AddCommandLine(IConfigurationBuilder, String[], IDictionary<String,String>) AddCommandLine(IConfigurationBuilder, String[], IDictionary<String,String>) AddCommandLine(IConfigurationBuilder, String[], IDictionary<String,String>)

Adds a CommandLineConfigurationProviderIConfigurationProvider that reads configuration values from the command line using the specified switch mappings.

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

Adds a new configuration source.

AddUserSecrets(IConfigurationBuilder) AddUserSecrets(IConfigurationBuilder) AddUserSecrets(IConfigurationBuilder)

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

AddUserSecrets(IConfigurationBuilder, Assembly) AddUserSecrets(IConfigurationBuilder, Assembly) AddUserSecrets(IConfigurationBuilder, Assembly)

Adds the user secrets configuration source.

AddUserSecrets(IConfigurationBuilder, String) AddUserSecrets(IConfigurationBuilder, String) AddUserSecrets(IConfigurationBuilder, String)

Adds the user secrets configuration source with specified secrets id.

AddUserSecrets<T>(IConfigurationBuilder) AddUserSecrets<T>(IConfigurationBuilder) AddUserSecrets<T>(IConfigurationBuilder)

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

AddEnvironmentVariables(IConfigurationBuilder) AddEnvironmentVariables(IConfigurationBuilder) AddEnvironmentVariables(IConfigurationBuilder)

Adds an IConfigurationProvider that reads configuration values from environment variables.

AddEnvironmentVariables(IConfigurationBuilder, Action<EnvironmentVariablesConfigurationSource>) AddEnvironmentVariables(IConfigurationBuilder, Action<EnvironmentVariablesConfigurationSource>) AddEnvironmentVariables(IConfigurationBuilder, Action<EnvironmentVariablesConfigurationSource>)

Adds an IConfigurationProvider that reads configuration values from environment variables.

AddEnvironmentVariables(IConfigurationBuilder, String) AddEnvironmentVariables(IConfigurationBuilder, String) AddEnvironmentVariables(IConfigurationBuilder, String)

Adds an IConfigurationProvider that reads configuration values from environment variables with a specified prefix.

GetFileLoadExceptionHandler(IConfigurationBuilder) GetFileLoadExceptionHandler(IConfigurationBuilder) GetFileLoadExceptionHandler(IConfigurationBuilder)

Gets the default IFileProvider to be used for file-based providers.

GetFileProvider(IConfigurationBuilder) GetFileProvider(IConfigurationBuilder) GetFileProvider(IConfigurationBuilder)

Gets the default IFileProvider to be used for file-based providers.

SetBasePath(IConfigurationBuilder, String) SetBasePath(IConfigurationBuilder, String) SetBasePath(IConfigurationBuilder, String)

Sets the FileProvider for file-based providers to a PhysicalFileProvider with the base path.

SetFileLoadExceptionHandler(IConfigurationBuilder, Action<FileLoadExceptionContext>) SetFileLoadExceptionHandler(IConfigurationBuilder, Action<FileLoadExceptionContext>) SetFileLoadExceptionHandler(IConfigurationBuilder, Action<FileLoadExceptionContext>)

Sets a default action to be invoked for file-based providers when an error occurs.

SetFileProvider(IConfigurationBuilder, IFileProvider) SetFileProvider(IConfigurationBuilder, IFileProvider) SetFileProvider(IConfigurationBuilder, IFileProvider)

Sets the default IFileProvider to be used for file-based providers.

AddIniFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean) AddIniFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean) AddIniFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean)

Adds a INI configuration source to builder.

AddIniFile(IConfigurationBuilder, Action<IniConfigurationSource>) AddIniFile(IConfigurationBuilder, Action<IniConfigurationSource>) AddIniFile(IConfigurationBuilder, Action<IniConfigurationSource>)

Adds a INI configuration source to builder.

AddIniFile(IConfigurationBuilder, String) AddIniFile(IConfigurationBuilder, String) AddIniFile(IConfigurationBuilder, String)

Adds the INI configuration provider at path to builder.

AddIniFile(IConfigurationBuilder, String, Boolean) AddIniFile(IConfigurationBuilder, String, Boolean) AddIniFile(IConfigurationBuilder, String, Boolean)

Adds the INI configuration provider at path to builder.

AddIniFile(IConfigurationBuilder, String, Boolean, Boolean) AddIniFile(IConfigurationBuilder, String, Boolean, Boolean) AddIniFile(IConfigurationBuilder, String, Boolean, Boolean)

Adds the INI configuration provider at path to builder.

AddJsonFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean) AddJsonFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean) AddJsonFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean)

Adds a JSON configuration source to builder.

AddJsonFile(IConfigurationBuilder, Action<JsonConfigurationSource>) AddJsonFile(IConfigurationBuilder, Action<JsonConfigurationSource>) AddJsonFile(IConfigurationBuilder, Action<JsonConfigurationSource>)

Adds a JSON configuration source to builder.

AddJsonFile(IConfigurationBuilder, String) AddJsonFile(IConfigurationBuilder, String) AddJsonFile(IConfigurationBuilder, String)

Adds the JSON configuration provider at path to builder.

AddJsonFile(IConfigurationBuilder, String, Boolean) AddJsonFile(IConfigurationBuilder, String, Boolean) AddJsonFile(IConfigurationBuilder, String, Boolean)

Adds the JSON configuration provider at path to builder.

AddJsonFile(IConfigurationBuilder, String, Boolean, Boolean) AddJsonFile(IConfigurationBuilder, String, Boolean, Boolean) AddJsonFile(IConfigurationBuilder, String, Boolean, Boolean)

Adds the JSON configuration provider at path to builder.

AddKeyPerFile(IConfigurationBuilder, Action<KeyPerFileConfigurationSource>) AddKeyPerFile(IConfigurationBuilder, Action<KeyPerFileConfigurationSource>) AddKeyPerFile(IConfigurationBuilder, Action<KeyPerFileConfigurationSource>)

Adds configuration using files from a directory. File names are used as the key, file contents are used as the value.

AddKeyPerFile(IConfigurationBuilder, String, Boolean) AddKeyPerFile(IConfigurationBuilder, String, Boolean) AddKeyPerFile(IConfigurationBuilder, String, Boolean)

Adds configuration using files from a directory. File names are used as the key, file contents are used as the value.

AddInMemoryCollection(IConfigurationBuilder) AddInMemoryCollection(IConfigurationBuilder) AddInMemoryCollection(IConfigurationBuilder)

Adds the memory configuration provider to configurationBuilder.

AddInMemoryCollection(IConfigurationBuilder, IEnumerable<KeyValuePair<String,String>>) AddInMemoryCollection(IConfigurationBuilder, IEnumerable<KeyValuePair<String,String>>) AddInMemoryCollection(IConfigurationBuilder, IEnumerable<KeyValuePair<String,String>>)

Adds the memory configuration provider to configurationBuilder.

AddUserSecrets(IConfigurationBuilder, Assembly) AddUserSecrets(IConfigurationBuilder, Assembly) AddUserSecrets(IConfigurationBuilder, Assembly)

Adds the user secrets configuration source. This searches assembly for an instance of UserSecretsIdAttribute, which specifies a user secrets ID.

A user secrets ID is unique value used to store and identify a collection of secret configuration values.

AddUserSecrets(IConfigurationBuilder, Assembly, Boolean) AddUserSecrets(IConfigurationBuilder, Assembly, Boolean) AddUserSecrets(IConfigurationBuilder, Assembly, Boolean)

Adds the user secrets configuration source. This searches assembly for an instance of UserSecretsIdAttribute, which specifies a user secrets ID.

A user secrets ID is unique value used to store and identify a collection of secret configuration values.

AddUserSecrets(IConfigurationBuilder, Assembly, Boolean, Boolean) AddUserSecrets(IConfigurationBuilder, Assembly, Boolean, Boolean) AddUserSecrets(IConfigurationBuilder, Assembly, Boolean, Boolean)

Adds the user secrets configuration source. This searches assembly for an instance of UserSecretsIdAttribute, which specifies a user secrets ID.

A user secrets ID is unique value used to store and identify a collection of secret configuration values.

AddUserSecrets(IConfigurationBuilder, String) AddUserSecrets(IConfigurationBuilder, String) AddUserSecrets(IConfigurationBuilder, String)

Adds the user secrets configuration source with specified user secrets ID.

A user secrets ID is unique value used to store and identify a collection of secret configuration values.

AddUserSecrets(IConfigurationBuilder, String, Boolean) AddUserSecrets(IConfigurationBuilder, String, Boolean) AddUserSecrets(IConfigurationBuilder, String, Boolean)

Adds the user secrets configuration source with specified user secrets ID.

A user secrets ID is unique value used to store and identify a collection of secret configuration values.

AddUserSecrets<T>(IConfigurationBuilder) AddUserSecrets<T>(IConfigurationBuilder) AddUserSecrets<T>(IConfigurationBuilder)

Adds the user secrets configuration source. Searches the assembly that contains type T for an instance of UserSecretsIdAttribute, which specifies a user secrets ID.

A user secrets ID is unique value used to store and identify a collection of secret configuration values.

AddUserSecrets<T>(IConfigurationBuilder, Boolean) AddUserSecrets<T>(IConfigurationBuilder, Boolean) AddUserSecrets<T>(IConfigurationBuilder, Boolean)

Adds the user secrets configuration source. Searches the assembly that contains type T for an instance of UserSecretsIdAttribute, which specifies a user secrets ID.

A user secrets ID is unique value used to store and identify a collection of secret configuration values.

AddUserSecrets<T>(IConfigurationBuilder, Boolean, Boolean) AddUserSecrets<T>(IConfigurationBuilder, Boolean, Boolean) AddUserSecrets<T>(IConfigurationBuilder, Boolean, Boolean)

Adds the user secrets configuration source. Searches the assembly that contains type T for an instance of UserSecretsIdAttribute, which specifies a user secrets ID.

A user secrets ID is unique value used to store and identify a collection of secret configuration values.

AddXmlFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean) AddXmlFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean) AddXmlFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean)

Adds a XML configuration source to builder.

AddXmlFile(IConfigurationBuilder, Action<XmlConfigurationSource>) AddXmlFile(IConfigurationBuilder, Action<XmlConfigurationSource>) AddXmlFile(IConfigurationBuilder, Action<XmlConfigurationSource>)

Adds a XML configuration source to builder.

AddXmlFile(IConfigurationBuilder, String) AddXmlFile(IConfigurationBuilder, String) AddXmlFile(IConfigurationBuilder, String)

Adds the XML configuration provider at path to builder.

AddXmlFile(IConfigurationBuilder, String, Boolean) AddXmlFile(IConfigurationBuilder, String, Boolean) AddXmlFile(IConfigurationBuilder, String, Boolean)

Adds the XML configuration provider at path to builder.

AddXmlFile(IConfigurationBuilder, String, Boolean, Boolean) AddXmlFile(IConfigurationBuilder, String, Boolean, Boolean) AddXmlFile(IConfigurationBuilder, String, Boolean, Boolean)

Adds the XML configuration provider at path to builder.

Applies to