Cleanup registry usage within CoreLib (dotnet/coreclr#20050)
authorJan Kotas <jkotas@microsoft.com>
Wed, 19 Sep 2018 21:12:40 +0000 (14:12 -0700)
committerGitHub <noreply@github.com>
Wed, 19 Sep 2018 21:12:40 +0000 (14:12 -0700)
commit9e134caa5f52636a2567fbe6c32e08b8be219dec
tree419d1ce7f1dac9db46ed75449abc99c67eeec224
parent01392623a855b3911f6924ba47c3ee94f085fef5
Cleanup registry usage within CoreLib (dotnet/coreclr#20050)

- Ensure that the registry keys are always disposed
- Use smaller subset of registry APIs
- Reduce diffs with CoreCLR/CoreFX
- Contributes to dotnet/coreclr#11009 and dotnet/coreclr#17899

Commit migrated from https://github.com/dotnet/coreclr/commit/21078fbf9fccddc05c8156be9b42b7cafcc19448
src/coreclr/src/System.Private.CoreLib/src/Microsoft/Win32/RegistryKey.cs
src/coreclr/src/System.Private.CoreLib/src/System/ThrowHelper.cs
src/libraries/System.Private.CoreLib/src/Interop/Windows/Interop.Errors.cs
src/libraries/System.Private.CoreLib/src/Microsoft/Win32/Registry.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventProvider.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/HijriCalendar.Win32.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/JapaneseCalendar.Win32.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/JapaneseCalendar.WinRT.cs
src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Win32.cs