File tree Expand file tree Collapse file tree 2 files changed +18
-7
lines changed
src/System.Management.Automation Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 1+ // Copyright (c) Microsoft Corporation.
2+ // Licensed under the MIT License.
3+
4+ #nullable enable
5+
6+ #if ! UNIX
7+ using System . Runtime . InteropServices ;
8+
9+ internal static partial class Interop
10+ {
11+ internal static partial class Windows
12+ {
13+ [ LibraryImport ( "api-ms-win-core-processthreads-l1-1-0.dll" ) ]
14+ internal static partial uint GetCurrentThreadId ( ) ;
15+ }
16+ }
17+ #endif
Original file line number Diff line number Diff line change @@ -105,16 +105,10 @@ internal static uint GetNativeThreadId()
105105#if UNIX
106106 return Platform . NonWindowsGetThreadId ( ) ;
107107#else
108- return NativeMethods . GetCurrentThreadId ( ) ;
108+ return Interop . Windows . GetCurrentThreadId ( ) ;
109109#endif
110110 }
111111
112- private static class NativeMethods
113- {
114- [ DllImport ( PinvokeDllNames . GetCurrentThreadIdDllName ) ]
115- internal static extern uint GetCurrentThreadId ( ) ;
116- }
117-
118112 #region ASTUtils
119113
120114 /// <summary>
You can’t perform that action at this time.
0 commit comments