ConfigurationManager class
ConfigurationManager is a mutable configuration object. It is both an ConfigurationBuilder and an ConfigurationRoot. As sources are added, it updates its current view of configuration.
- Implemented types
- Available extensions
Constructors
- ConfigurationManager()
- Creates an empty mutable configuration object that is both an ConfigurationBuilder and an ConfigurationRoot.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
properties
→ Map<
String, Object> -
Gets a key/value collection that can be used to share data between
the ConfigurationBuilder and the registered ConfigurationSources.
no setteroverride
-
providers
→ Iterable<
ConfigurationProvider> -
The
ConfigurationProviders for this configuration.no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sources
→ List<
ConfigurationSource> -
Gets the sources used to obtain configuration values.
no setteroverride
Methods
-
add(
ConfigurationSource source) → ConfigurationBuilder -
Adds a new configuration source.
override
-
addCommandLine(
Iterable< String> args, [LinkedHashMap<String, String> ? switchMappings]) → ConfigurationBuilder -
Available on ConfigurationBuilder, provided by the CommandLineConfigurationExtensions extension
Adds a CommandLineConfigurationProvider ConfigurationProvider that reads configuration values from the command line. -
addConfiguration(
Configuration config, [bool shouldDisposeConfiguration = false]) → ConfigurationBuilder -
Available on ConfigurationBuilder, provided by the ChainedBuilderExtensions extension
Adds an existing configuration to ConfigurationBuilder. -
addIni(
String input) → ConfigurationBuilder -
Available on ConfigurationBuilder, provided by the IniConfigurationExtensions extension
Adds an INI configuration source with the given input string. -
addIniStream(
Stream stream) → ConfigurationBuilder -
Available on ConfigurationBuilder, provided by the IniConfigurationExtensions extension
Adds an INI configuration source from a stream. -
addInMemoryCollection(
[Iterable< MapEntry< ? initialData]) → ConfigurationBuilderString, String> > -
Available on ConfigurationBuilder, provided by the MemoryConfigurationBuilderExtensions extension
Adds the memory configuration provider toconfigurationBuilder. -
addJson(
String input, {bool optional = false, bool reloadOnChange = false}) → ConfigurationBuilder -
Available on ConfigurationBuilder, provided by the JsonConfigurationExtensions extension
Adds a JSON configuration source from a string. -
addJsonFile(
String path, {bool optional = false, bool reloadOnChange = false}) → ConfigurationBuilder -
Available on ConfigurationBuilder, provided by the JsonConfigurationExtensions extension
Adds a JSON configuration source from a file. -
addXml(
String input) → ConfigurationBuilder -
Available on ConfigurationBuilder, provided by the XmlConfigurationExtensions extension
Adds an XML configuration source with the given input string. -
addXmlStream(
Stream stream) → ConfigurationBuilder -
Available on ConfigurationBuilder, provided by the XmlConfigurationExtensions extension
Adds an XML configuration source from a stream. -
asIterable(
{bool makePathsRelative = false}) → Iterable< MapEntry< String, String> > -
Available on Configuration, provided by the ConfigurationExtensions extension
Get the enumeration of key value pairs within the Configuration -
build(
) → ConfigurationRoot -
Builds a Configuration with keys and values from the set of
sources registered in sources.
override
-
dispose(
) → void -
Performs application-defined tasks associated with freeing, releasing,
or resetting unmanaged resources.
override
-
getChildren(
) → Iterable< ConfigurationSection> -
Gets the immediate children sub-sections.
override
-
getChildrenImplementation(
String? path) → Iterable< ConfigurationSection> -
Available on ConfigurationRoot, provided by the InternalConfigurationRootExtensions extension
Gets the immediate children sub-sections of configuration root based on key. -
getConnectionString(
String name) → String? -
Available on Configuration, provided by the ConfigurationExtensions extension
Gets the connection string -
getDebugView(
) → String -
Available on ConfigurationRoot, provided by the ConfigurationRootExtensions extension
-
getReloadToken(
) → IChangeToken -
Returns a IChangeToken that can be used to observe
when this configuration is reloaded.
override
-
getRequiredSection(
String key) → IConfigurationSection -
Available on Configuration, provided by the ConfigurationExtensions extension
Gets a configuration sub-section with the specified key. -
getSection(
String key) → ConfigurationSection -
Gets a configuration sub-section with the specified key.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reload(
) → void -
Force the configuration values to be reloaded from the
underlying ConfigurationProviders.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String key) → String? -
Gets the value corresponding to a configuration key.
override
-
operator []=(
String key, String? value) → void -
Sets the value corresponding to a configuration key.
override