Table of Contents

Class RegistryUtility

Namespace
ArcanaDevelopment.adTempus.Shared
Assembly
ArcanaDevelopment.adTempus.Shared.dll
public static class RegistryUtility
Inheritance
object
RegistryUtility

Methods

CopyKey(RegistryKey, string, RegistryKey, string)

Copy a registry key. The parentKey must be writeable.

public static bool CopyKey(RegistryKey sourceRoot, string sourceKeyName, RegistryKey targetParentKey, string targetKeyName)

Parameters

NameTypeDescription
sourceRoot RegistryKey
sourceKeyName string
targetParentKey RegistryKey
targetKeyName string

Returns

bool

CopyValues(RegistryKey, RegistryKey)

public static void CopyValues(RegistryKey sourceKey, RegistryKey destinationKey)

Parameters

NameTypeDescription
sourceKey RegistryKey
destinationKey RegistryKey

CopyValues(RegistryKey, RegistryKey, List<string>)

public static void CopyValues(RegistryKey sourceKey, RegistryKey destinationKey, List<string> valuesToSkip)

Parameters

NameTypeDescription
sourceKey RegistryKey
destinationKey RegistryKey
valuesToSkip List<string>

GetValue(RegistryKey, string, bool)

public static bool GetValue(RegistryKey key, string valueName, bool defaultValue)

Parameters

NameTypeDescription
key RegistryKey
valueName string
defaultValue bool

Returns

bool

GetValue(RegistryKey, string, int)

public static int GetValue(RegistryKey key, string valueName, int defaultValue)

Parameters

NameTypeDescription
key RegistryKey
valueName string
defaultValue int

Returns

int

GetValue(RegistryKey, string, string, bool)

public static bool GetValue(RegistryKey root, string subkeyName, string valueName, bool defaultValue)

Parameters

NameTypeDescription
root RegistryKey
subkeyName string
valueName string
defaultValue bool

Returns

bool

GetValue(RegistryKey, string, string, int)

public static int GetValue(RegistryKey root, string subkeyName, string valueName, int defaultValue)

Parameters

NameTypeDescription
root RegistryKey
subkeyName string
valueName string
defaultValue int

Returns

int

GetValue(RegistryKey, string, string, string)

public static string GetValue(RegistryKey root, string subkeyName, string valueName, string defaultValue = null)

Parameters

NameTypeDescription
root RegistryKey
subkeyName string
valueName string
defaultValue string

Returns

string

KeyExists(RegistryKey, string)

public static bool KeyExists(RegistryKey root, string keyName)

Parameters

NameTypeDescription
root RegistryKey
keyName string

Returns

bool

TryGetValue(RegistryKey, string, out string)

public static bool TryGetValue(RegistryKey key, string valueName, out string value)

Parameters

NameTypeDescription
key RegistryKey
valueName string
value string

Returns

bool

TryGetValueAsBool(RegistryKey, string, out bool)

public static bool TryGetValueAsBool(RegistryKey key, string valueName, out bool value)

Parameters

NameTypeDescription
key RegistryKey
valueName string
value bool

Returns

bool

TryGetValueAsInt(RegistryKey, string, out int)

public static bool TryGetValueAsInt(RegistryKey key, string valueName, out int value)

Parameters

NameTypeDescription
key RegistryKey
valueName string
value int

Returns

bool