Singleton object that holds all settings. More...
Public Member Functions | |
string | GetValue (string key) |
Get a setting, null if not set. | |
string | GetValue (string key, string @default) |
Get a setting, default if not set. | |
void | Save () |
Save settings. | |
void | OpenSqliteDatabase (string database) |
Open an Sqlite Database. | |
void | OpenSqliteDatabase (string database, bool disableCommit) |
Open an Sqlite Database. | |
void | Dispose () |
Release resources held by this object. | |
void | Close () |
Close the database connection. | |
Protected Member Functions | |
virtual void | Dispose (bool disposing) |
Dispose this object. | |
Properties | |
internal Repository | Repository [get] |
Get the repository. | |
string | this [string key] [get, set] |
static Settings | Instance [get] |
static internal Repository | Repo [get] |
A shortcut to Settings.Instance.Repository. | |
Private Member Functions | |
Settings () | |
~Settings () | |
Finalize this object. | |
Private Attributes | |
Repository | repository = null |
Static Private Attributes | |
static Settings | instance = null |
Singleton object that holds all settings.
Definition at line 13 of file Settings.cs.
Foodolini.BusinessLogic.Settings.Settings | ( | ) | [private] |
Definition at line 17 of file Settings.cs.
Foodolini.BusinessLogic.Settings.~Settings | ( | ) | [private] |
Finalize this object.
Definition at line 161 of file Settings.cs.
void Foodolini.BusinessLogic.Settings.Close | ( | ) |
void Foodolini.BusinessLogic.Settings.Dispose | ( | ) |
Release resources held by this object.
Definition at line 152 of file Settings.cs.
virtual void Foodolini.BusinessLogic.Settings.Dispose | ( | bool | disposing | ) | [protected, virtual] |
Dispose this object.
This boolean disposing parameter here ensures that objects with a finalizer is not disposed, this is method is invoked from the finalizer. Do overwrite, and call, this method in base classes if you use any unmanaged resources.
disposing | A System.Boolean False if called from the finalizer, True if called from Dispose. |
Definition at line 140 of file Settings.cs.
string Foodolini.BusinessLogic.Settings.GetValue | ( | string | key, | |
string @ | default | |||
) |
Get a setting, default if not set.
Definition at line 65 of file Settings.cs.
string Foodolini.BusinessLogic.Settings.GetValue | ( | string | key | ) |
Get a setting, null if not set.
Definition at line 58 of file Settings.cs.
void Foodolini.BusinessLogic.Settings.OpenSqliteDatabase | ( | string | database, | |
bool | disableCommit | |||
) |
Open an Sqlite Database.
database | Path to Sqlite database | |
disableCommit | If true transactions will never be commited |
Definition at line 101 of file Settings.cs.
void Foodolini.BusinessLogic.Settings.OpenSqliteDatabase | ( | string | database | ) |
Open an Sqlite Database.
database | Path to Sqlite database |
Definition at line 86 of file Settings.cs.
void Foodolini.BusinessLogic.Settings.Save | ( | ) |
Settings Foodolini.BusinessLogic.Settings.instance = null [static, private] |
Definition at line 107 of file Settings.cs.
Repository Foodolini.BusinessLogic.Settings.repository = null [private] |
Definition at line 15 of file Settings.cs.
Settings Foodolini.BusinessLogic.Settings.Instance [static, get] |
Definition at line 108 of file Settings.cs.
internal Repository Foodolini.BusinessLogic.Settings.Repo [static, get, private] |
A shortcut to Settings.Instance.Repository.
Definition at line 119 of file Settings.cs.
internal Repository Foodolini.BusinessLogic.Settings.Repository [get, private] |
Get the repository.
Definition at line 23 of file Settings.cs.
string Foodolini.BusinessLogic.Settings.this[string key] [get, set] |
Get/set settings
Definition at line 34 of file Settings.cs.