Method | Description | |
---|---|---|
DatabaseSettings ( IDatabaseConnection databaseConnection ) : System |
Constructor to initialise an empty store of settings, using the table name of "settings"
|
|
DatabaseSettings ( string tableName, IDatabaseConnection databaseConnection ) : System |
Constructor to initialise an empty store of settings, specifying the table name to use to store the settings
|
|
GetBoolean ( string settingName ) : bool |
Returns a specified setting as a boolean
|
|
GetDecimal ( string settingName ) : decimal |
Returns the configuration for the setting name provided
|
|
GetDecimal ( string settingName, System.DateTime date ) : decimal |
Returns a specified setting as a decimal
|
|
GetString ( string settingName ) : string |
Returns a specified setting as a string
|
|
GetString ( string settingName, System.DateTime date ) : string |
Returns a specified setting as a string
|
|
HasSetting ( string settingName ) : bool |
Returns whether the setting exists or not.
|
|
SetBoolean ( string settingName, bool boolValue ) : void |
Sets a specified setting as a boolean
|
|
SetDecimal ( string settingName, decimal settingValue ) : void |
Sets a setting with a decimal value (using the InvariantCulture). Uses DateTime.Now for the date of the setting to indicate when the setting was changed.
|
|
SetString ( string settingName, string settingValue ) : void |
Sets a specified setting as a string
|
Method | Description | |
---|---|---|
CreateInsertStatement ( string settingName, string settingValue ) : |
Creates a sql insert statement from the name and value provided
|
|
CreateSelectStatement ( string settingName, System.DateTime date ) : |
Creates a sql select statement to retrieve the named setting at the date specified
|
|
CreateUpdateStatementNoDate ( string settingName, string settingValue ) : |
Creates a sql update statement from the name and value provided, with no date specified
|
|
GetValue ( string settingName, System.DateTime date ) : object |
Retrieves the named setting with the date specified, either from the cache or from the database if the cached value has expired
|
|
RetrieveSettingValue ( string settingName, System.DateTime date, object &value ) : bool | ||
SetValue ( string settingName, string settingValue ) : void |
Updates the named setting in the database with the value specified
|
|
UpdateCache ( string settingName ) : void |
Refreshes the cached setting stored in this instance, by retrieving the updated setting from the database
|
public DatabaseSettings ( IDatabaseConnection databaseConnection ) : System | ||
databaseConnection | IDatabaseConnection | |
return | System |
public DatabaseSettings ( string tableName, IDatabaseConnection databaseConnection ) : System | ||
tableName | string | The table name in which to store settings |
databaseConnection | IDatabaseConnection | |
return | System |
public GetBoolean ( string settingName ) : bool | ||
settingName | string | The setting name |
return | bool |
public GetDecimal ( string settingName ) : decimal | ||
settingName | string | The setting name |
return | decimal |
public GetDecimal ( string settingName, System.DateTime date ) : decimal | ||
settingName | string | The setting name |
date | System.DateTime | The date at which to check the setting |
return | decimal |
public GetString ( string settingName ) : string | ||
settingName | string | The setting name |
return | string |
public GetString ( string settingName, System.DateTime date ) : string | ||
settingName | string | The setting name |
date | System.DateTime | The date of the setting to retrieve /// (ie this method will retrieve the setting value as at this date |
return | string |
public HasSetting ( string settingName ) : bool | ||
settingName | string | The name of the setting to look for. |
return | bool |
public SetBoolean ( string settingName, bool boolValue ) : void | ||
settingName | string | The setting name |
boolValue | bool | The value to set it to |
return | void |
public SetDecimal ( string settingName, decimal settingValue ) : void | ||
settingName | string | The name of the setting to set |
settingValue | decimal | The value to set the setting to. |
return | void |
public SetString ( string settingName, string settingValue ) : void | ||
settingName | string | The setting name |
settingValue | string | The value to set it to |
return | void |