diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2016-12-27 16:46:08 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2016-12-27 16:46:08 +0900 |
commit | db20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch) | |
tree | e5435159cd1bf0519276363a6fe1663d1721bed3 /src/mscorlib/src/Microsoft/Win32/Registry.cs | |
parent | 4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff) | |
download | coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2 coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip |
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/mscorlib/src/Microsoft/Win32/Registry.cs')
-rw-r--r-- | src/mscorlib/src/Microsoft/Win32/Registry.cs | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/src/mscorlib/src/Microsoft/Win32/Registry.cs b/src/mscorlib/src/Microsoft/Win32/Registry.cs index 4faf29da7f..3ee5f4648b 100644 --- a/src/mscorlib/src/Microsoft/Win32/Registry.cs +++ b/src/mscorlib/src/Microsoft/Win32/Registry.cs @@ -17,7 +17,6 @@ namespace Microsoft.Win32 { //This class contains only static members and does not need to be serializable. [ComVisible(true)] public static class Registry { - [System.Security.SecuritySafeCritical] // auto-generated static Registry() { } @@ -63,17 +62,6 @@ namespace Microsoft.Win32 { * This is where current configuration information is stored. */ public static readonly RegistryKey CurrentConfig = RegistryKey.GetBaseKey(RegistryKey.HKEY_CURRENT_CONFIG); - -#if !FEATURE_CORECLR - /** - * Dynamic Data Root Key. - * - * LEGACY: This is where dynamic performance data is stored on Win9X. - * This does not exist on NT. - */ - [Obsolete("The DynData registry key only works on Win9x, which is no longer supported by the CLR. On NT-based operating systems, use the PerformanceData registry key instead.")] - public static readonly RegistryKey DynData = RegistryKey.GetBaseKey(RegistryKey.HKEY_DYN_DATA); -#endif // // Following function will parse a keyName and returns the basekey for it. @@ -81,10 +69,9 @@ namespace Microsoft.Win32 { // If the keyName is not valid, we will throw ArgumentException. // The return value shouldn't be null. // - [System.Security.SecurityCritical] // auto-generated private static RegistryKey GetBaseKeyFromKeyName(string keyName, out string subKeyName) { if( keyName == null) { - throw new ArgumentNullException("keyName"); + throw new ArgumentNullException(nameof(keyName)); } string basekeyName; @@ -116,13 +103,8 @@ namespace Microsoft.Win32 { case "HKEY_CURRENT_CONFIG": basekey = Registry.CurrentConfig; break; -#if !FEATURE_CORECLR - case "HKEY_DYN_DATA": - basekey = RegistryKey.GetBaseKey(RegistryKey.HKEY_DYN_DATA); - break; -#endif default: - throw new ArgumentException(Environment.GetResourceString("Arg_RegInvalidKeyName", "keyName")); + throw new ArgumentException(Environment.GetResourceString("Arg_RegInvalidKeyName", nameof(keyName))); } if( i == -1 || i == keyName.Length) { subKeyName = string.Empty; @@ -133,7 +115,6 @@ namespace Microsoft.Win32 { return basekey; } - [System.Security.SecuritySafeCritical] // auto-generated public static object GetValue(string keyName, string valueName, object defaultValue ) { string subKeyName; RegistryKey basekey = GetBaseKeyFromKeyName(keyName, out subKeyName); @@ -154,7 +135,6 @@ namespace Microsoft.Win32 { SetValue(keyName, valueName, value, RegistryValueKind.Unknown); } - [System.Security.SecuritySafeCritical] // auto-generated public static void SetValue(string keyName, string valueName, object value, RegistryValueKind valueKind ) { string subKeyName; RegistryKey basekey = GetBaseKeyFromKeyName(keyName, out subKeyName); |