ConfigurationManager Class
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.
Represents a mutable configuration object.
public ref class ConfigurationManager sealed : IDisposable, Microsoft::Extensions::Configuration::IConfigurationManager, Microsoft::Extensions::Configuration::IConfigurationRoot
public sealed class ConfigurationManager : IDisposable, Microsoft.Extensions.Configuration.IConfigurationManager, Microsoft.Extensions.Configuration.IConfigurationRoot
type ConfigurationManager = class
interface IConfigurationManager
interface IConfiguration
interface IConfigurationBuilder
interface IConfigurationRoot
interface IDisposable
Public NotInheritable Class ConfigurationManager
Implements IConfigurationManager, IConfigurationRoot, IDisposable
- Inheritance
-
ConfigurationManager
- Implements
It is both an IConfigurationBuilder and an IConfigurationRoot. As sources are added, it updates its current view of configuration.
Configuration |
Creates an empty mutable configuration object that is both an IConfigurationBuilder and an IConfigurationRoot. |
Item[String] |
Gets or sets a configuration value. |
Sources |
Gets the sources used to obtain configuration values. |
Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Gets the immediate descendant configuration subsections. |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets a configuration subsection with the specified key. |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
To |
Returns a string that represents the current object. (Inherited from Object) |
IConfiguration. |
Returns a IChangeToken that can be used to observe when this configuration is reloaded. |
IConfiguration |
Adds a new configuration source. |
IConfiguration |
Builds an IConfiguration with keys and values from the set of sources registered in Sources. |
IConfiguration |
Gets a key-value collection that can be used to share data between the IConfigurationBuilder and the registered configuration sources. |
IConfiguration |
Gets the configuration providers for this configuration. |
IConfiguration |
Forces the configuration values to be reloaded from the underlying IConfigurationProvider instances. |
Add |
Registers a configuration provider for application metadata. |
Add |
Adds an existing configuration to |
Add |
Adds an existing configuration to |
Add |
Adds an IConfigurationProvider that reads configuration values from the command line. |
Add |
Adds a CommandLineConfigurationProviderIConfigurationProvider that reads configuration values from the command line using the specified switch mappings. |
Add |
Adds a CommandLineConfigurationProviderIConfigurationProvider that reads configuration values from the command line. |
Bind(IConfiguration, Object, Action<Binder |
Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. |
Bind(IConfiguration, Object) |
Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. |
Bind(IConfiguration, String, Object) |
Attempts to bind the given object instance to the configuration section specified by the key by matching property names against configuration keys recursively. |
Get(IConfiguration, Type, Action<Binder |
Attempts to bind the configuration instance to a new instance of type T. If this configuration section has a value, that will be used. Otherwise binding by matching property names against configuration keys recursively. |
Get(IConfiguration, Type) |
Attempts to bind the configuration instance to a new instance of type T. If this configuration section has a value, that will be used. Otherwise binding by matching property names against configuration keys recursively. |
Get<T>(IConfiguration, Action<Binder |
Attempts to bind the configuration instance to a new instance of type T. If this configuration section has a value, that will be used. Otherwise binding by matching property names against configuration keys recursively. |
Get<T>(IConfiguration) |
Attempts to bind the configuration instance to a new instance of type T. If this configuration section has a value, that will be used. Otherwise binding by matching property names against configuration keys recursively. |
Get |
Extracts the value with the specified key and converts it to the specified type. |
Get |
Extracts the value with the specified key and converts it to the specified type. |
Get |
Extracts the value with the specified key and converts it to type T. |
Get |
Extracts the value with the specified key and converts it to type T. |
Add<TSource>(IConfiguration |
Adds a new configuration source. |
As |
Get the enumeration of key value pairs within the IConfiguration |
As |
Get the enumeration of key value pairs within the IConfiguration |
Get |
Gets the specified connection string from the specified configuration.
Shorthand for |
Get |
Gets a configuration subsection with the specified key. |
Get |
Generates a human-readable view of the configuration showing where each value came from. |
Get |
Generates a human-readable view of the configuration showing where each value came from. |
Add |
Adds an IConfigurationProvider that reads configuration values from environment variables. |
Add |
Adds an IConfigurationProvider that reads configuration values from environment variables with a specified prefix. |
Add |
Adds an IConfigurationProvider that reads configuration values from environment variables. |
Get |
Gets a default action to be invoked for file-based providers when an error occurs. |
Get |
Gets the default IFileProvider to be used for file-based providers. |
Set |
Sets the FileProvider for file-based providers to a PhysicalFileProvider with the base path. |
Set |
Sets a default action to be invoked for file-based providers when an error occurs. |
Set |
Sets the default IFileProvider to be used for file-based providers. |
Add |
Adds a INI configuration source to |
Add |
Adds a INI configuration source to |
Add |
Adds the INI configuration provider at |
Add |
Adds the INI configuration provider at |
Add |
Adds the INI configuration provider at |
Add |
Adds a INI configuration source to |
Add |
Adds a JSON configuration source to |
Add |
Adds a JSON configuration source to |
Add |
Adds the JSON configuration provider at |
Add |
Adds the JSON configuration provider at |
Add |
Adds the JSON configuration provider at |
Add |
Adds a JSON configuration source to |
Add |
Adds configuration using files from a directory. File names are used as the key, file contents are used as the value. |
Add |
Adds configuration using files from a directory. File names are used as the key, file contents are used as the value. |
Add |
Adds configuration using files from a directory. File names are used as the key, file contents are used as the value. |
Add |
Adds configuration using files from a directory. File names are used as the key, file contents are used as the value. |
Add |
Adds the memory configuration provider to |
Add |
Adds the memory configuration provider to |
Add |
Adds the user secrets configuration source. This searches A user secrets ID is unique value used to store and identify a collection of secret configuration values. |
Add |
Adds the user secrets configuration source. This searches A user secrets ID is unique value used to store and identify a collection of secret configuration values. |
Add |
Adds the user secrets configuration source. This searches A user secrets ID is unique value used to store and identify a collection of secret configuration values. |
Add |
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. |
Add |
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. |
Add |
Adds the user secrets configuration source. Searches the assembly that contains type A user secrets ID is unique value used to store and identify a collection of secret configuration values. |
Add |
Adds the user secrets configuration source. Searches the assembly that contains type A user secrets ID is unique value used to store and identify a collection of secret configuration values. |
Add |
Adds the user secrets configuration source. Searches the assembly that contains type A user secrets ID is unique value used to store and identify a collection of secret configuration values. |
Add |
Adds an XML configuration source to |
Add |
Adds an XML configuration source to |
Add |
Adds the XML configuration provider at |
Add |
Adds the XML configuration provider at |
Add |
Adds the XML configuration provider at |
Add |
Adds an XML configuration source to |
Produkt | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET er et åben kildekode projekt. Vælg et link for at give feedback: