Interface IConfigurationService
A service that gets and sets configuration settings.
See AConfig Configuration Facility, AConfig, and JsonConfigurationService for further details.
Namespace: actionETL.Configuration
Assembly: actionETL.dll
Syntax
public interface IConfigurationService
Methods
SetValue(String, String, String)
Creates or updates a configuration value.
This method must be thread-safe.
Declaration
IConfigurationService SetValue(string configurationName, string applyTo, string valueString)
Parameters
| Type | Name | Description |
|---|---|---|
| String | configurationName | Name of the configuration. |
| String | applyTo | What part of the worker hierarchy this configuration applies to. Use |
| String | valueString | The value as a string. |
Returns
| Type | Description |
|---|---|
| IConfigurationService | The |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
TryGetValue<T>(String, String, CultureInfo)
Attempts to get a configuration value, returning an IGetValueOutcome
instance describing the outcome. To instead throw an exception on any failure, use the
AConfig GetValue and GetValueWithDefault methods.
On success, ApplyToMatched describes whether ApplyTo was both used and matched, or not. This is typically used to give configurations with ApplyTo higher precedence vs. non-ApplyTo configurations.
This method must be thread-safe.
Declaration
IGetValueOutcome TryGetValue<T>(string configurationName, string applyTo, CultureInfo culture)
Parameters
| Type | Name | Description |
|---|---|---|
| String | configurationName | Name of the configuration. Cannot be |
| String | applyTo | What part of the worker hierarchy the configuration applies to. If set, first looks for
a matching
Use |
| CultureInfo | culture | The culture to use when converting a string to a typed value. Defaults to
InvariantCulture if |
Returns
| Type | Description |
|---|---|
| IGetValueOutcome | The outcome is returned in a class instance derived from IGetValueOutcome:
Typical usage is to call |
Type Parameters
| Name | Description |
|---|---|
| T | The target value type. TryGetValue<T>(String, String, CultureInfo) describes what types the default service supports. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|