SPABuilder.ConfigReader Class Reference

Detailed Description

Reads configuration from a file. The basic structure of a configuration file is: Property Name = "value"; Property = value; /* Block Comment

Public Member Functions

 ConfigReader (string file)
 Sets up a new config reader for the given config file. 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

Dictionary< string, string > Settings =new Dictionary<string,string>()
 The parsed settings from the config file. More...
 

Properties

string this[string property] [get, set]
 Gets or sets the named configuration property. More...
 

Constructor & Destructor Documentation

SPABuilder.ConfigReader.ConfigReader ( string  file)
inline

Sets up a new config reader for the given config file.

Member Function Documentation

bool SPABuilder.ConfigReader.GetBoolean ( string  property)
inline

Gets the named property as a true/false value. A property that doesn't exist will always be false.

Parameters
propertyThe property to get the value for.
Returns
True if the value is e.g. yes/true/yep etc.
bool SPABuilder.ConfigReader.GetBoolean ( string  property,
bool  ifNotFound 
)
inline

Gets the named property as a true/false value. A property that doesn't exist will be the defined value.

Parameters
propertyThe property to get the value for.
ifNotFoundThe value the result should be if the named property is not found.
Returns
True if the value is e.g. yes/true/yep etc.

Member Data Documentation

Dictionary<string,string> SPABuilder.ConfigReader.Settings =new Dictionary<string,string>()

The parsed settings from the config file.

Property Documentation

string SPABuilder.ConfigReader.this[string property]
getset

Gets or sets the named configuration property.

Parameters
propertyThe configuration property to get or set the value of.