Confing  1.0
Configuration properties manipulation in INI Files and the Windows Registry
Public Member Functions | Properties | List of all members
Multipetros.Config.SimpleIni Class Reference
Inheritance diagram for Multipetros.Config.SimpleIni:
Multipetros.Config.ConfigBase

Public Member Functions

 SimpleIni (string file)
 
 SimpleIni (string file, bool autosave)
 
 SimpleIni (string file, bool autosave, bool ignoreCase)
 
 SimpleIni (string file, bool autosave, bool ignoreCase, char separator)
 
void Save ()
 

Properties

string this[string key] [get, set]
 

Additional Inherited Members

- Static Public Member Functions inherited from Multipetros.Config.ConfigBase
static string EncodeB64 (string val)
 
static string DecodeB64 (string val)
 
static string AddQuotes (string val)
 
static string RemoveQuotes (string val)
 

Detailed Description

Constructor & Destructor Documentation

Multipetros.Config.SimpleIni.SimpleIni ( string  file)

The simplest constructor, with filename only to configure. Autosave properties setted as False, ingore case as True, and the Separator as "=".

Parameters
fileA valid file path, with read and write priviliges
Multipetros.Config.SimpleIni.SimpleIni ( string  file,
bool  autosave 
)

Constructor with the filename and Autosave mode to configure. Ingore case setted True, and Separator by default as "=".

Parameters
fileA valid file path, with read and write priviliges.
autosaveTrue, to save each time a Property added or setted. False, to save manualy by calling the Save() method
Multipetros.Config.SimpleIni.SimpleIni ( string  file,
bool  autosave,
bool  ignoreCase 
)

Constructor, with filename, autosave mode, ingore case, and separator to configure.

Parameters
fileA valid file path, with read and write priviliges.
autosaveTrue, to save each time a Property added or setted. False, to save manualy by calling the Save() method
ignoreCaseTrue to ignore case, False to make properties keys case sensitive
Multipetros.Config.SimpleIni.SimpleIni ( string  file,
bool  autosave,
bool  ignoreCase,
char  separator 
)

The complete params constructor, with filename, autosave mode, ignore case and separator to configure

Parameters
fileA valid file path, with read and write priviliges.
autosaveTrue, to save each time a Property added or setted. False, to save manualy by calling the Save() method
ignoreCaseTrue to ignore case, False to make properties keys case sensitive
separatorSeparator character for keys and values

Member Function Documentation

void Multipetros.Config.SimpleIni.Save ( )

Store all properties, with their latest changes to the file

Property Documentation

string Multipetros.Config.SimpleIni.this[string key]
getset

Access properties like Dictionary, negotiating with the Property key name eg: iniObj["keyName"]
When getting value of the specified property, or empty string if property not found
When setting a value for a non-existed property, the property will be automatically added.
If the setting value is null the property will be deleted.