Namespace actionETL.Configuration
Functionality for reading and writing configuration settings. Also see AConfig Configuration Facility.
Classes
AConfig
Get and set configuration settings, e.g. folder and file names, URLs, system settings (dataflow buffer sizes etc.)
Each worker system uses an AConfig instance via the Config
property, but it can also be used stand-alone, without any worker system.
See AConfig Configuration Facility and JsonConfigurationService for further details.
AConfigSetting
Contains configuration name string constants the system uses with AConfig. The library user can get and set the settings using these constants, to e.g. change the port buffer capacity for a specific port.
The library user can also set and get custom settings, using any other configuration names, although it is recommended the same dot-separated format is used.
While users can create any custom configuration name, the "User." prefix is guaranteed to never be used by the system.
See AConfig Configuration Facility for details.
ConfigurationServiceItem
An immutable and thread-safe class for representing a configuration setting returned from an IConfigurationService.
Normally only used when implementing a new IConfigurationService.
GetValueOutcome
static class whose only purpose is to contain four nested
IGetValueOutcome classes, which are returned from
TryGetValue<T>(String, String, CultureInfo)
implementations:
GetValueOutcome.NotFound, GetValueOutcome.NotSupported, GetValueOutcome.ParseError, and
GetValueOutcome.Succeeded.
Typical usage is to call TryGetValue and switch on the type of the returned instance.
GetValueOutcome.NotFound
Returned by TryGetValue<T>(String, String, CultureInfo) as well as TryGetValue<T>(String, String, CultureInfo) implementations when a matching configuration could not be found.
GetValueOutcome.NotSupported
Returned by TryGetValue<T>(String, String, CultureInfo) as well as TryGetValue<T>(String, String, CultureInfo) implementations when the target type is not supported.
GetValueOutcome.ParseError
Returned by
TryGetValue<T>(String, String, CultureInfo)
as well as
TryGetValue<T>(String, String, CultureInfo)
implementations when a parsing error occurred when reading the configuration.
If not null, Exception provides detail on the error.
GetValueOutcome.Succeeded
Returned by TryGetValue<T>(String, String, CultureInfo) as well as TryGetValue<T>(String, String, CultureInfo) implementations when the configuration was parsed successfully. Value contains the resulting value, and ApplyToMatched describes whether 'ApplyTo' was used and matched, or not.
JsonConfigurationService
A service for loading configuration settings from JSON files, strings etc. into memory, and for getting and setting their (in-memory) values. Note that saving settings to JSON files is not supported.
This is the default configuration service for worker systems, but it can also be used stand-alone. See AConfig Configuration Facility and AConfig for further details.
Note that multiple calls to the Load*() methods can be made, which is useful when
loading a mix of mandatory and optional files.
On a modern computer, GetValue() can retrieve more than 10 million string settings per second, and retrieve and parse more than 1 million date settings per second. While very fast, do cache the values where appropriate, e.g. if accessing a setting once per dataflow row.
Interfaces
IConfigurationService
A service that gets and sets configuration settings.
See AConfig Configuration Facility, AConfig, and JsonConfigurationService for further details.
IConfigurationServiceItem
An interface for representing a configuration setting returned from an IConfigurationService.
Normally only used when implementing a new IConfigurationService.
IGetValueOutcome
Marker interface for types returned from TryGetValue<T>(String, String, CultureInfo) implementations: GetValueOutcome.NotFound, GetValueOutcome.NotSupported, GetValueOutcome.ParseError, and GetValueOutcome.Succeeded.
Typical usage is to call TryGetValue and switch on the type of the returned instance.