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
pChapterRegistryChaptersEnumThe Chapter to read from.
pKeyNamestringThe 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
pChapterRegistryChaptersEnumThe Chapter to read from.
pKeyNamestringThe key to read from.
pItemNamestringThe 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
pChapterRegistryChaptersEnumThe Chapter to read from.
pKeyNamestringThe 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
pChapterRegistryChaptersEnumThe Chapter to read from.
pKeyNamestringThe key to read from.
pItemNamestringThe 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
pChapterRegistryChaptersEnumThe Chapter to read from.
pKeyNamestringThe name of the key to get.
pItemNamestringThe name of the item to set.
pValueobjectThe value to set the item to.
pCreateIfNotExistingboolPass as True to make sure the key is created if not existing.
Returns
- bool
A boolean indicating success.