public static T RetrieveDefaultUserRegistryValue <T>(string subkeyName, string valueName) { return(RegistryHelper.RetrieveRegistryValue <T>(Registry.Users, ".DEFAULT\\" + subkeyName, valueName)); }
public static T RetrieveCurrentUserRegistryValue <T>(string subkeyName, string valueName) { return(RegistryHelper.RetrieveRegistryValue <T>(Registry.CurrentUser, subkeyName, valueName)); }
public static T RetrieveLocalMachineRegistryValue <T>(string subkeyName, string valueName) { return(RegistryHelper.RetrieveRegistryValue <T>(Registry.LocalMachine, subkeyName, valueName)); }
public static bool SetCurrentUserRegistryValue <T>(string subkeyName, string valueName, T value, RegistryValueKind valueKind) { return(RegistryHelper.SetRegistryValue <T>(Registry.CurrentUser, subkeyName, valueName, value, valueKind)); }
public static bool SetCurrentUserRegistryValue <T>(string subkeyName, string valueName, T value) { return(RegistryHelper.SetCurrentUserRegistryValue <T>(subkeyName, valueName, value, RegistryValueKind.Unknown)); }
public static bool SetRegistryValue <T>(RegistryKey registryKey, string subkeyName, string valueName, T value, RegistryValueKind valueKind) { RegistryKey registrySubkey = RegistryHelper.OpenSubkey(registryKey, subkeyName, true); if (registrySubkey == null) { if ((object)value == null) { return(true); } if (RegistryHelper.RegistryExceptionWrapper((Action)(() => registrySubkey = registryKey.CreateSubKey(subkeyName))) != null) { return(false); } } if (registrySubkey == null) { return(false); } try { return(((object)value != null ? RegistryHelper.RegistryExceptionWrapper((Action)(() => registrySubkey.SetValue(valueName, (object)(T)value, valueKind))) : RegistryHelper.RegistryExceptionWrapper((Action)(() => registrySubkey.DeleteValue(valueName, false)))) == null); } finally { registrySubkey.Close(); } }
public static bool SetRegistryValue <T>(RegistryKey registryKey, string subkeyName, string valueName, T value) { return(RegistryHelper.SetRegistryValue <T>(registryKey, subkeyName, valueName, value, RegistryValueKind.Unknown)); }
public static T RetrieveVisualStudioRegistryValue <T>(VisualStudioRegistryLocation primaryKey, string subkeyName, string valueName) { return(Enumerable.FirstOrDefault <T>(RegistryHelper.RetrieveAllVisualStudioRegistryValues <T>(primaryKey, subkeyName, valueName))); }