Class PolarRegistry
- Namespace
- PolarStudioGlobals
- Assembly
- PolarStudioGlobals.dll
This class is a helper to use the Windows registry. Used internally.
public static class PolarRegistry
- Inheritance
-
PolarRegistry
- Inherited Members
Methods
GetRegistryKeys(RegistryChaptersEnum, string)
Returns an array of strings containing the key names in a registry key.
public static string[] GetRegistryKeys(RegistryChaptersEnum pChapter, string pKeyName)
Parameters
pChapter
RegistryChaptersEnumThe Chapter to read from.
pKeyName
stringThe key to read from.
Returns
- string[]
An array of strings with the found names of sub-keys.
GetRegistryValue(RegistryChaptersEnum, string, string)
Geta a value from the registry.
public static string GetRegistryValue(RegistryChaptersEnum pChapter, string pKeyName, string pItemName)
Parameters
pChapter
RegistryChaptersEnumThe Chapter to read from.
pKeyName
stringThe key to read from.
pItemName
stringThe item to read from.
Returns
- string
The value of the registry item as string.
GetRegistryValue_Key(RegistryChaptersEnum, string)
Returns a RegistryKey object.
public static RegistryKey GetRegistryValue_Key(RegistryChaptersEnum pChapter, string pKeyName)
Parameters
pChapter
RegistryChaptersEnumThe Chapter to read from.
pKeyName
stringThe name of the key to get.
Returns
- RegistryKey
The found RegistryKey.
Exceptions
GetRegistryValue_Raw(RegistryChaptersEnum, string, string)
Geta a value from the registry.
public static object GetRegistryValue_Raw(RegistryChaptersEnum pChapter, string pKeyName, string pItemName)
Parameters
pChapter
RegistryChaptersEnumThe Chapter to read from.
pKeyName
stringThe key to read from.
pItemName
stringThe item to read from.
Returns
- object
The raw value of the registry item.
SetRegistryValue(RegistryChaptersEnum, string, string, object, bool)
Sets/creates a registry key.
public static bool SetRegistryValue(RegistryChaptersEnum pChapter, string pKeyName, string pItemName, object pValue, bool pCreateIfNotExisting)
Parameters
pChapter
RegistryChaptersEnumThe Chapter to read from.
pKeyName
stringThe name of the key to get.
pItemName
stringThe name of the item to set.
pValue
objectThe value to set the item to.
pCreateIfNotExisting
boolPass as True to make sure the key is created if not existing.
Returns
- bool
A boolean indicating success.