DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Properties | List of all members
Deveel.Data.Configuration.ConfigKey Class Reference

A single key of a configuration that defines the name and type of the value that a ConfigValue associated with this key will handle. More...

Public Member Functions

 ConfigKey (string name, Type valueType)
 Constructs the key with the given name and value type. More...
 
 ConfigKey (string name, object defaultValue, Type valueType)
 Constructs the key with the given name, value type and a provided default value. More...
 

Properties

string Name [get, private set]
 Gets the key name that is unique within the configuration context. More...
 
Type ValueType [get, private set]
 Gets the Type of the value handled by this key. More...
 
object DefaultValue [get, private set]
 Gets an optional default value that will be returned in case of missing explicitly set associated value. More...
 

Detailed Description

A single key of a configuration that defines the name and type of the value that a ConfigValue associated with this key will handle.

A key is unique within a configuration object and when defined by a child in the configuration three, this will replace the one defined in the parent.

Keys can be aggregated by groups using a specific ConfigGroup.Separator.

See also
ConfigValue, ConfigGroup.Separator

Definition at line 37 of file ConfigKey.cs.

Constructor & Destructor Documentation

Deveel.Data.Configuration.ConfigKey.ConfigKey ( string  name,
Type  valueType 
)
inline

Constructs the key with the given name and value type.

Parameters
nameThe unique name of the configuration key.
valueTypeThe type of compatible values this key will handle.

This constructor does not define any default value for missing values in a configuration, that means a request for the key will return the ValueType default.

Definition at line 48 of file ConfigKey.cs.

49  : this(name, null, valueType) {
50  }
Deveel.Data.Configuration.ConfigKey.ConfigKey ( string  name,
object  defaultValue,
Type  valueType 
)
inline

Constructs the key with the given name, value type and a provided default value.

Parameters
nameThe unique name of the configuration key.
valueTypeThe type of compatible values this key will handle.
defaultValueA given default value that will be returned when a value is not explicitly associated to this key.

Definition at line 60 of file ConfigKey.cs.

60  {
61  if (String.IsNullOrEmpty(name))
62  throw new ArgumentNullException("name");
63  if (valueType == null)
64  throw new ArgumentNullException("valueType");
65 
66  ValueType = valueType;
67  Name = name;
68  DefaultValue = defaultValue;
69  }
A long string in the system.
string Name
Gets the key name that is unique within the configuration context.
Definition: ConfigKey.cs:74
Type ValueType
Gets the Type of the value handled by this key.
Definition: ConfigKey.cs:79
object DefaultValue
Gets an optional default value that will be returned in case of missing explicitly set associated val...
Definition: ConfigKey.cs:85

Property Documentation

object Deveel.Data.Configuration.ConfigKey.DefaultValue
getprivate set

Gets an optional default value that will be returned in case of missing explicitly set associated value.

Definition at line 85 of file ConfigKey.cs.

string Deveel.Data.Configuration.ConfigKey.Name
getprivate set

Gets the key name that is unique within the configuration context.

Definition at line 74 of file ConfigKey.cs.

Type Deveel.Data.Configuration.ConfigKey.ValueType
getprivate set

Gets the Type of the value handled by this key.

Definition at line 79 of file ConfigKey.cs.


The documentation for this class was generated from the following file: