Reads configuration settings from a set of files.
Public Member Functions | |
Config () | |
Creates new empty configuration. More... | |
Config (OnLog logMethod) | |
Creates new configuration with the given log method. More... | |
ConfigReader | AddFile (string path) |
Adds the given file to the reader set if the file exists. More... | |
string | Get (string property) |
Gets the config setting for the given property. More... | |
bool | GetBoolean (string property) |
Gets the named property as a true/false value. A property that doesn't exist will always be false. More... | |
bool | GetBoolean (string property, bool ifNotFound) |
Gets the named property as a true/false value. A property that doesn't exist will be the defined value. More... | |
Public Attributes | |
OnLog | LogMethod |
A method to call when a message is logged (but not to a file). More... | |
List< ConfigReader > | AllReaders |
All config readers in order of preference. The first one in the list is overridden by the ones following it. More... | |
|
inline |
Creates new empty configuration.
|
inline |
Creates new configuration with the given log method.
logMethod | The method to call when a message is logged (but not to a file). |
|
inline |
Adds the given file to the reader set if the file exists.
path | The path to the file to add. |
|
inline |
Gets the config setting for the given property.
property | The property to get the value of. |
|
inline |
Gets the named property as a true/false value. A property that doesn't exist will always be false.
property | The property to get the value for. |
|
inline |
Gets the named property as a true/false value. A property that doesn't exist will be the defined value.
property | The property to get the value for. |
ifNotFound | The value the result should be if the named property is not found. |
List<ConfigReader> SPABuilder.Config.AllReaders |
All config readers in order of preference. The first one in the list is overridden by the ones following it.
OnLog SPABuilder.Config.LogMethod |
A method to call when a message is logged (but not to a file).