ConfigurationBuilder class

Used to build key/value based configuration settings for use in an application.

Implementers
Available extensions

Constructors

ConfigurationBuilder()

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 setter
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 setter

Methods

add(ConfigurationSource source) → void
Adds a new configuration source.
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<String, String>>? initialData]) ConfigurationBuilder

Available on ConfigurationBuilder, provided by the MemoryConfigurationBuilderExtensions extension

Adds the memory configuration provider to configurationBuilder.
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.
build() ConfigurationRoot
Builds a Configuration with keys and values from the set of sources registered in sources.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited