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

Public Member Functions

 RegistryIni (string productName)
 
 RegistryIni (string companyName, string productName)
 
 RegistryIni (string productName, RegistryNode regNode)
 
 RegistryIni (string companyName, string productName, RegistryNode regNode)
 
void DeleteSubKey (string[] parentSubKeys, string subKey)
 
void DeleteSubKey (string parentSubKeysPath, string subKey)
 
void DeleteSubKey (string subKey)
 
void DeleteSubKeyTree (string subKey)
 

Public Attributes

string this[string[] subKeys
 

Properties

string this[string name] [get, set]
 
string this[string subKey, string name] [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.RegistryIni.RegistryIni ( string  productName)

The simplest constructor, with only the product name to configure. The properties stored under the HKEY_CURRENT_USER\ node

Parameters
productNameThe product name. Used as parent key.
Multipetros.Config.RegistryIni.RegistryIni ( string  companyName,
string  productName 
)

Constructor with company & product name to configure. The properties stored under the HKEY_CURRENT_USER\ node

Parameters
companyNameThe company name. Used as parent key.
productNameThe product name. Used as child key of the company's name.
Multipetros.Config.RegistryIni.RegistryIni ( string  productName,
RegistryNode  regNode 
)

Constructor with product name & registry node to configure. The properties can be stored under the:

  • HKEY_CURRENT_USER\ node, or
  • HKEY_LOCAL_MACHINE\ node, or
  • HKEY_LOCAL_MACHINE\ node for 64bit setups, when 32bit binary used.
Parameters
productNameThe product name. Used as parent key.
regNodeRegisty Node (HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE) selection to use.
Multipetros.Config.RegistryIni.RegistryIni ( string  companyName,
string  productName,
RegistryNode  regNode 
)

Constructor with company name, product name & registry node to configure. The properties can be stored under the:

  • HKEY_CURRENT_USER\ node, or
  • HKEY_LOCAL_MACHINE\ node, or
  • HKEY_LOCAL_MACHINE\ node for 64bit setups, when 32bit binary used.
Parameters
companyNameThe company name. Used as parent key.
productNameThe product name. Used as child key of the company's name.
regNodeRegisty Node (HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE) selection to use.

Member Function Documentation

void Multipetros.Config.RegistryIni.DeleteSubKey ( string[]  parentSubKeys,
string  subKey 
)

Delete the subkey, its parent path specified in the array. Each right array element represent a child for the element at the left. e.g.: ["a","b","c"] parentSubKeys means the subKey under the app_basic_key \ Use it with care! Can't be undone.

Parameters
parentSubKeysThe parent subkey path in array format
subKeyThe child subkey name
void Multipetros.Config.RegistryIni.DeleteSubKey ( string  parentSubKeysPath,
string  subKey 
)

Delete the subkey, under the specified parent path. Each parent key of the path, separated virtualy with a \ character. e.g.: "a\\b\\c" parentSubKeysPath means the subKey under the app_basic_key \ Use it with care! Can't be undone.

Parameters
parentSubKeysPathThe parent subkey path
subKeyThe child subkey name
void Multipetros.Config.RegistryIni.DeleteSubKey ( string  subKey)

Delete the specified subkey, which is located directly beneath the application basic key. Use it with care! Can't be undone.

Parameters
subKeyThe subkey name
void Multipetros.Config.RegistryIni.DeleteSubKeyTree ( string  subKey)

Delete the specified subkey tree. Use it with care! Can't be undone.

Parameters
subKeyThe parent subkey name

Member Data Documentation

string this[string[] Multipetros.Config.RegistryIni.subKeys

Access properties like Dictionary, negotiating with the property subkeys path & value name eg: registryIniObj[["subKeyA","subKeyB",..],"valueName"]
When getting value of the specified property, or empty string if property not found
When setting a value for a non-existed subkeys path-value name pair, the subkeys path-value name pair will be automatically added.
If the setting value is null the property will be deleted.
Each right array element represent a child for the element at the left. e.g.: ["a","b","c"] parentSubKeys means the subKey under the app_basic_key </em>

Property Documentation

string Multipetros.Config.RegistryIni.this[string name]
getset

Access properties like Dictionary, negotiating with the property value name eg: registryIniObj["valueName"]
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.

string Multipetros.Config.RegistryIni.this[string subKey, string name]
getset

Access properties like Dictionary, negotiating with the property sub key & value name eg: registryIniObj["subKeyName","valueName"]
When getting value of the specified property, or empty string if property not found
When setting a value for a non-existed subkey-value name pair, the subkey-value name pair will be automatically added.
If the setting value is null the property will be deleted.
You can also specify a subkeys path, by separating the parent subkeys inside the subkey name string, e.g. "a\\b\\c" to specify the path app_basic_key