IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Provides functionality for retrieving settings from various sources such as application settings file or PADO server configuration file. More...
Public Types | |
enum | SettingSource { SettingSource.Unknown = 0, SettingSource.AppConfig, SettingSource.PadoServer } |
Public Member Functions | |
string | GetSetting (string settingname) |
Retrieves the specified setting from the current settings source. More... | |
bool | GetBooleanSetting (string settingname) |
Retrieves the specified boolean setting from the current settings source. More... | |
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... | |
long | GetIntegerSetting (string settingname, long defaultvalue) |
Retrieves the specified integer setting from the current settings source. More... | |
string | GetSettingAppConfig (string settingname) |
bool | GetBooleanSettingAppConfig (string settingname) |
string | GetSettingPadoServer (Premisa.PadoInterfaces.itfPadoServer server, string settingname) |
Retrieves the specified setting from the PADO Server's connfiguration file. More... | |
bool | GetBooleanSettingPadoServer (Premisa.PadoInterfaces.itfPadoServer server, string settingname) |
Retrieves the specified boolean setting from the PADO Server's connfiguration file. More... | |
string | GetSettingPadoServer (Premisa.PadoServerClasses.clsPadoObjectManager om, string settingname) |
Retrieves the specified setting from the PADO Server's connfiguration file. More... | |
bool | GetBooleanSettingPadoServer (Premisa.PadoServerClasses.clsPadoObjectManager om, string settingname) |
Retrieves the specified boolean setting from the PADO Server's connfiguration file. More... | |
Public Attributes | |
object | lockobj = new object() |
bool | ExpandEnvironmentVariables = true |
Protected Member Functions | |
void | SetSourceAppconfig () |
Sets the source of settings to application configuration file. Warning: A call to this method and subsequent reading operations must be enclosed in a lock block, more specifically in "lock (lockobj) { .. }". More... | |
void | SetSourcePadoServer (Premisa.PadoInterfaces.itfPadoServer padoserver) |
Sets the source of settings to the Pado Server configuration file. Warning: A call to this method and subsequent reading operations must be enclosed in a lock block, more specifically in "lock (lockobj) { .. }". More... | |
void | SetSourcePadoServer (Premisa.PadoServerClasses.clsPadoObjectManager om) |
Sets the source of settings to the Pado Server configuration file. Warning: A call to this method and subsequent reading operations must be enclosed in a lock block, more specifically in "lock (lockobj) { .. }". More... | |
Protected Attributes | |
SettingSource | Source = SettingSource.Unknown |
Private 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... | |
Private Attributes | |
Premisa.PadoInterfaces.itfPadoServer | PadoServer = null |
Provides functionality for retrieving settings from various sources such as application settings file or PADO server configuration file.
|
inlineprivate |
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.
strsetting | String representation of the specific setting. |
Referenced by LabexUtilities.SettingsReader.GetBooleanSetting(), LabexUtilities.SettingsReader.GetBooleanSettingAppConfig(), and LabexUtilities.SettingsReader.GetBooleanSettingPadoServer().
|
inlineprivate |
Converts a string representation of an integer setting to an integer value. If the setting is not defined then 0 is returned.
strsetting | String representation of the specific setting. |
Referenced by LabexUtilities.SettingsReader.GetIntegerSetting().
|
inlineprivate |
Converts a string representation of an integer setting to an integer value.
strsetting | String representation of the specific setting. |
defaultvalue | Default value returned in the case that the setting is not defined. |
|
inlineprotected |
Sets the source of settings to application configuration file. Warning: A call to this method and subsequent reading operations must be enclosed in a lock block, more specifically in "lock (lockobj) { .. }".
|
inlineprotected |
Sets the source of settings to the Pado Server configuration file. Warning: A call to this method and subsequent reading operations must be enclosed in a lock block, more specifically in "lock (lockobj) { .. }".
padoserver | Reference to the Pado Server through wihich the server settings can be accessed. |
References LabexUtilities.SettingsReader.PadoServer.
|
inlineprotected |
Sets the source of settings to the Pado Server configuration file. Warning: A call to this method and subsequent reading operations must be enclosed in a lock block, more specifically in "lock (lockobj) { .. }".
om | Reference to the Pado ObjectManager through wihich the server settings can be accessed. |
References LabexUtilities.SettingsReader.PadoServer.
|
inline |
Retrieves the specified setting from the current settings source.
settingname | Setting name. |
References LabexUtilities.SettingsReader.GetSettingAppConfig(), LabexUtilities.SettingsReader.GetSettingPadoServer(), and LabexUtilities.SettingsReader.PadoServer.
Referenced by LabexUtilities.SettingsReader.GetBooleanSetting(), and LabexUtilities.SettingsReader.GetIntegerSetting().
|
inline |
Retrieves the specified boolean setting from the current settings source.
settingname | Setting name. |
References LabexUtilities.SettingsReader.GetSetting(), and LabexUtilities.SettingsReader.ToBoolean().
|
inline |
Retrieves the specified integer setting from the current settings source. If the specific setting is not specified in the configuration then 0 is returned.
settingname | Setting name. |
References LabexUtilities.SettingsReader.GetSetting(), and LabexUtilities.SettingsReader.ToInt().
|
inline |
Retrieves the specified integer setting from the current settings source.
settingname | Setting name. |
defaultvalue | Value returned in the case that the correspondig setting is not defined. |
References LabexUtilities.SettingsReader.GetSetting(), and LabexUtilities.SettingsReader.ToInt().
|
inline |
|
inline |
|
inline |
Retrieves the specified setting from the PADO Server's connfiguration file.
server | Pado server whose setting file defines the settings. |
settingname | Setting name. |
Referenced by LabexUtilities.SettingsReader.GetBooleanSettingPadoServer(), LabexUtilities.SettingsReader.GetSetting(), and LabexUtilities.SettingsReader.GetSettingPadoServer().
|
inline |
Retrieves the specified boolean setting from the PADO Server's connfiguration file.
om | |
settingname |
References LabexUtilities.SettingsReader.GetSettingPadoServer(), and LabexUtilities.SettingsReader.ToBoolean().
Referenced by LabexUtilities.SettingsReader.GetBooleanSettingPadoServer().
|
inline |
Retrieves the specified setting from the PADO Server's connfiguration file.
References LabexUtilities.SettingsReader.GetSettingPadoServer().
|
inline |
Retrieves the specified boolean setting from the PADO Server's connfiguration file.
References LabexUtilities.SettingsReader.GetBooleanSettingPadoServer().
object LabexUtilities.SettingsReader.lockobj = new object() |
bool LabexUtilities.SettingsReader.ExpandEnvironmentVariables = true |
|
protected |
|
private |