IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Lib.SettingsReaderBase Class Referenceabstract
+ Inheritance diagram for IG.Lib.SettingsReaderBase:
+ Collaboration diagram for IG.Lib.SettingsReaderBase:

Public Member Functions

abstract string GetSetting (string settingname)
 Retrieves the specified setting from the current settings source. More...
 
virtual bool GetBooleanSetting (string settingname)
 Retrieves the specified boolean setting from the current settings source. More...
 
virtual long GetIntegerSetting (string settingname)
 Retrieves the specified integer setting from the current settings source. If the specific setting is not specified in the configuration then 0 is returned. More...
 
virtual long GetIntegerSetting (string settingname, long defaultvalue)
 Retrieves the specified integer setting from the current settings source. More...
 
abstract string GetSetting (string settingname)
 Retrieves the specified setting from the current settings source. More...
 
virtual bool GetBooleanSetting (string settingname)
 Retrieves the specified boolean setting from the current settings source. More...
 
virtual long GetIntegerSetting (string settingname)
 Retrieves the specified integer setting from the current settings source. If the specific setting is not specified in the configuration then 0 is returned. More...
 
virtual long GetIntegerSetting (string settingname, long defaultvalue)
 Retrieves the specified integer setting from the current settings source. More...
 

Protected Member Functions

bool ToBoolean (string strsetting)
 Converts a string representation of a boolean setting to boolean. Strings "true", "yes" and "on" (regardless of capitalization) or non-zero integer representations result to true, anything else (including null or empty string) result in false. More...
 
long ToInt (string strsetting)
 Converts a string representation of an integer setting to an integer value. If the setting is not defined then 0 is returned. More...
 
long ToInt (string strsetting, long defaultvalue)
 Converts a string representation of an integer setting to an integer value. More...
 

Protected Attributes

bool _expandEnv = true
 

Properties

object Lock [get]
 ILockable.Lock, gets a public lock for the current object. More...
 
virtual bool ExpandEnvironmentVariables [get, set]
 
- Properties inherited from IG.Lib.ILockable
object Lock [get]
 

Static Private Member Functions

static ISettingsRreader FromAppConfig ()
 
static ISettingsRreader FromAppConfig ()
 

Private Attributes

object lockobj = new object()
 

Member Function Documentation

abstract string IG.Lib.SettingsReaderBase.GetSetting ( string  settingname)
pure virtual

Retrieves the specified setting from the current settings source.

Parameters
settingnameSetting name.

Implemented in IG.Lib.SettingsReaderAppConfig, and IG.Lib.SettingsReaderAppConfig.

virtual bool IG.Lib.SettingsReaderBase.GetBooleanSetting ( string  settingname)
inlinevirtual

Retrieves the specified boolean setting from the current settings source.

Parameters
settingnameSetting name.

References IG.Lib.UtilStr.ToBoolean().

Referenced by LabexBis.BisCommunicationSettings.getsettings().

virtual long IG.Lib.SettingsReaderBase.GetIntegerSetting ( string  settingname)
inlinevirtual

Retrieves the specified integer setting from the current settings source. If the specific setting is not specified in the configuration then 0 is returned.

Parameters
settingnameSetting name.

References IG.Lib.UtilStr.ToInt().

Referenced by LabexBis.BisCommunicationSettings.getsettings().

virtual long IG.Lib.SettingsReaderBase.GetIntegerSetting ( string  settingname,
long  defaultvalue 
)
inlinevirtual

Retrieves the specified integer setting from the current settings source.

Parameters
settingnameSetting name.
defaultvalueValue returned in the case that the correspondig setting is not defined.

References IG.Lib.UtilStr.ToInt().

static ISettingsRreader IG.Lib.SettingsReaderBase.FromAppConfig ( )
inlinestaticprivate
abstract string IG.Lib.SettingsReaderBase.GetSetting ( string  settingname)
pure virtual

Retrieves the specified setting from the current settings source.

Parameters
settingnameSetting name.

Implemented in IG.Lib.SettingsReaderAppConfig, and IG.Lib.SettingsReaderAppConfig.

virtual bool IG.Lib.SettingsReaderBase.GetBooleanSetting ( string  settingname)
inlinevirtual

Retrieves the specified boolean setting from the current settings source.

Parameters
settingnameSetting name.
virtual long IG.Lib.SettingsReaderBase.GetIntegerSetting ( string  settingname)
inlinevirtual

Retrieves the specified integer setting from the current settings source. If the specific setting is not specified in the configuration then 0 is returned.

Parameters
settingnameSetting name.
virtual long IG.Lib.SettingsReaderBase.GetIntegerSetting ( string  settingname,
long  defaultvalue 
)
inlinevirtual

Retrieves the specified integer setting from the current settings source.

Parameters
settingnameSetting name.
defaultvalueValue returned in the case that the correspondig setting is not defined.
bool IG.Lib.SettingsReaderBase.ToBoolean ( string  strsetting)
inlineprotected

Converts a string representation of a boolean setting to boolean. Strings "true", "yes" and "on" (regardless of capitalization) or non-zero integer representations result to true, anything else (including null or empty string) result in false.

Parameters
strsettingString representation of the specific setting.
Returns
Boolean value corresponding to the setting.
long IG.Lib.SettingsReaderBase.ToInt ( string  strsetting)
inlineprotected

Converts a string representation of an integer setting to an integer value. If the setting is not defined then 0 is returned.

Parameters
strsettingString representation of the specific setting.
Returns
Long integer value corresponding to the setting.
long IG.Lib.SettingsReaderBase.ToInt ( string  strsetting,
long  defaultvalue 
)
inlineprotected

Converts a string representation of an integer setting to an integer value.

Parameters
strsettingString representation of the specific setting.
defaultvalueDefault value returned in the case that the setting is not defined.
Returns
Long integer value corresponding to the setting.
static ISettingsRreader IG.Lib.SettingsReaderBase.FromAppConfig ( )
inlinestaticprivate

Member Data Documentation

object IG.Lib.SettingsReaderBase.lockobj = new object()
private
bool IG.Lib.SettingsReaderBase._expandEnv = true
protected

Property Documentation

object IG.Lib.SettingsReaderBase.Lock
get

ILockable.Lock, gets a public lock for the current object.

bool IG.Lib.SettingsReaderBase.ExpandEnvironmentVariables
getset

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