Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Location: main sources module.
A constant source returns a preconfigured settings node and never issues any updates.
A lazy constant source does the same but defers the node acquisition until first subscription:
Errors in the provided delegate are propagated via (null, error)
notification. It's guaranteed to execute not more than once.
Constant sources are handy for unit testing and may serve as base classes for custom sources.
Location: Sources.Xml module.
XmlStringSource parses well-formed XML documents from in-memory strings and supports manual external updates:
XmlFileSource parses XML files and automatically watches for changes:
A file that does not exist simply leads to a null
node, which implies default settings values unless something is explicitly required.
Location: main sources module.
ObjectSource converts an arbitrary object (including anonymous types) to a settings node:
Conversion process obeys the following priority list:
Objects with overridden ToString
are converted to value nodes;
Dictionaries with primitive key types are converted to object nodes;
Conversion is performed recursively for keys and values;
Objects that implement IEnumerable
are converted to array nodes;
Conversion is performed recursively for sequence elements;
Everything else is converted to object nodes;
Conversion is performed recursively for public instance fields and properties;
Like constant sources, object source does not produce any updates by itself; conversion exceptions are exposed via (null, error)
notifications.
This source is not documented yet. Come back for updates later.
Location: Sources.Yaml module.
YamlStringSource parses well-formed YAML documents from in-memory strings and supports manual external updates:
YamlFileSource parses YAML files and automatically watches for changes:
A file that does not exist simply leads to a null
node, which implies default settings values unless something is explicitly required.
Location: .
parses well-formed JSON documents from in-memory strings and supports manual external updates:
​ parses JSON files and automatically watches for changes:
A file that does not exist simply leads to a null
, which implies default settings values unless something is .
This source is not documented yet. Come back for updates later.
Location: main sources module.
CommandLineSource converts CLI arguments into settings nodes.
It supports 7 syntax options for key-value parameters:
--key=value
--key value
-key=value
-key value
/key=value
/key value
key=value
Keys with dots (such as a.b.c
) are treated as hierarchical and get split into segments:
Multiple occurrences of the same key are merged into arrays.
This source is static and never issues data updates.
Standalone keys may optionally be supplied with a default value.
Standalone values may optionally be grouped under default key.
Location: main sources module.
EnvironmentVariablesSource converts process environment variables into settings nodes.
Keys with dots, colons and double underscores are treated as hierarchical and get split into segments:
This source is static and never issues data updates.