Foodolini.BusinessLogic.Settings Class Reference

Singleton object that holds all settings. More...

Collaboration diagram for Foodolini.BusinessLogic.Settings:
Collaboration graph

List of all members.

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

Detailed Description

Singleton object that holds all settings.

Definition at line 13 of file Settings.cs.


Constructor & Destructor Documentation

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.


Member Function Documentation

void Foodolini.BusinessLogic.Settings.Close (  ) 

Close the database connection.

The same as dispose

Definition at line 174 of file Settings.cs.

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.

Parameters:
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.

Parameters:
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.

Parameters:
database Path to Sqlite database

Definition at line 86 of file Settings.cs.

void Foodolini.BusinessLogic.Settings.Save (  ) 

Save settings.

This commits any changes to the database.

Definition at line 76 of file Settings.cs.


Member Data Documentation

Definition at line 107 of file Settings.cs.

Definition at line 15 of file Settings.cs.


Property Documentation

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.


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

Foodolini 1.0.0 Documentation, generated with DoxyGen.