diff options
author | Stephen Toub <stoub@microsoft.com> | 2019-10-03 22:28:18 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2019-10-05 15:09:54 +0300 |
commit | 1e3d0174797c3abb24773fe423c338de50cb4f1a (patch) | |
tree | 00b7ed759bbee965e7b125f0466f80cd4db42340 /netcore/System.Private.CoreLib/shared/Interop/Windows/Advapi32/Interop.RegEnumValue.cs | |
parent | 820542466734e0a1c73587b1ef3851c2de11250a (diff) |
More corelib cleanup (dotnet/coreclr#26993)
* Make relevant types static (mostly Interop)
* Fix a few stray semicolons
* Remove unnecessary locals
Some can be removed entirely, some can be replaced by discards.
* Remove unnecessary usings
* Move Unix-specific helper method to TimeZoneInfo.Unix.cs
* Remove duplicated code
* Remove duplicative checks
* Remove [ThreadStatic] initialization
These are all the default values and wouldn't be necessary for any static, but inline initialization for [ThreadStatic]s is particularly unuseful (and in non-default cases problematic) because the fields are only set to these values on the initializing thread.
* Fix methods whose return value is never used
* Use string.IsNullOrEmpty
* Remove unnecessary field initialization
All ctors overwrite these values.
* Address PR feedback
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Diffstat (limited to 'netcore/System.Private.CoreLib/shared/Interop/Windows/Advapi32/Interop.RegEnumValue.cs')
-rw-r--r-- | netcore/System.Private.CoreLib/shared/Interop/Windows/Advapi32/Interop.RegEnumValue.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/netcore/System.Private.CoreLib/shared/Interop/Windows/Advapi32/Interop.RegEnumValue.cs b/netcore/System.Private.CoreLib/shared/Interop/Windows/Advapi32/Interop.RegEnumValue.cs index 3d455d0ccdb..e2ab45dea19 100644 --- a/netcore/System.Private.CoreLib/shared/Interop/Windows/Advapi32/Interop.RegEnumValue.cs +++ b/netcore/System.Private.CoreLib/shared/Interop/Windows/Advapi32/Interop.RegEnumValue.cs @@ -11,9 +11,9 @@ using Internal.Win32.SafeHandles; using System; using System.Runtime.InteropServices; -internal partial class Interop +internal static partial class Interop { - internal partial class Advapi32 + internal static partial class Advapi32 { [DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegEnumValueW")] internal static extern unsafe int RegEnumValue( |