DeveelDB
20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
|
Defines the contract for the configuration node of a component within the system or of the system itself. More...
Public Member Functions | |
IEnumerable< string > | GetKeys (ConfigurationLevel level) |
Enumerates the keys that can be obtained by the object, at the given ConfigurationLevel. More... | |
void | SetValue (string key, object value) |
Sets a given value for a key defined by this object. More... | |
object | GetValue (string key) |
Gets a configuration setting for the given key. More... | |
Properties | |
IConfigSource | Source [get, set] |
Gets or sets an optional source of the configuration object More... | |
IConfiguration | Parent [get, set] |
Gets or sets an optional parent object of this configuration. More... | |
Defines the contract for the configuration node of a component within the system or of the system itself.
Since the configurations can be structured in nodes
of a tree, it is possible to define a Parent, that will be used to resolve a key and value of a setting, if the current node does not define it by itself.
Definition at line 33 of file IConfiguration.cs.
IEnumerable<string> Deveel.Data.Configuration.IConfiguration.GetKeys | ( | ConfigurationLevel | level | ) |
Enumerates the keys that can be obtained by the object, at the given ConfigurationLevel.
level | The level of definition of the keys to get. |
Implemented in Deveel.Data.Configuration.Configuration.
object Deveel.Data.Configuration.IConfiguration.GetValue | ( | string | key | ) |
Gets a configuration setting for the given key.
key | The key that identifies the setting to retrieve. |
null
if the key was not found in this or in the parent context. Implemented in Deveel.Data.Configuration.Configuration.
void Deveel.Data.Configuration.IConfiguration.SetValue | ( | string | key, |
object | value | ||
) |
Sets a given value for a key defined by this object.
key | The key to set the value for, that was defined before. |
value | The value to set. |
If the given key was not previously defined, this method will add the key at this level of configuration
Setting a value for a given key that was already defined by a parent object will override that value: a subsequent call to GetValue will return the current value of the setting, without removing the parent value setting.
ArgumentNullException | If the given key is null . |
Implemented in Deveel.Data.Configuration.Configuration.
|
getset |
Gets or sets an optional parent object of this configuration.
The tree structure of a configuration object makes the request for a given setting to fallback to parents if the object does not define the key itself.
A typical example of a parent/child structure is the configuration of a database system and the configuration of a single database: the system defines default values for all the databases, while a single database can override a setting or define new settings.
Definition at line 61 of file IConfiguration.cs.
|
getset |
Gets or sets an optional source of the configuration object
This property is optional and it is convenient when it is required to save or reload the values to/from the source, retaining a reference to the origin.
Definition at line 43 of file IConfiguration.cs.