@@ -50,9 +50,9 @@ public EventWaitHandle(bool initialState, EventResetMode mode, string name)
50
50
#if PLATFORM_UNIX
51
51
throw new PlatformNotSupportedException ( SR . PlatformNotSupported_NamedSynchronizationPrimitives ) ;
52
52
#else
53
- if ( System . IO . Path . MaxPath < name . Length )
53
+ if ( Interop . Kernel32 . MAX_PATH < name . Length )
54
54
{
55
- throw new ArgumentException ( SR . Format ( SR . Argument_WaitHandleNameTooLong , name , Path . MaxPath ) , nameof ( name ) ) ;
55
+ throw new ArgumentException ( SR . Format ( SR . Argument_WaitHandleNameTooLong , name , Interop . Kernel32 . MAX_PATH ) , nameof ( name ) ) ;
56
56
}
57
57
#endif
58
58
}
@@ -98,9 +98,9 @@ internal unsafe EventWaitHandle(bool initialState, EventResetMode mode, string n
98
98
#if PLATFORM_UNIX
99
99
throw new PlatformNotSupportedException ( SR . PlatformNotSupported_NamedSynchronizationPrimitives ) ;
100
100
#else
101
- if ( System . IO . Path . MaxPath < name . Length )
101
+ if ( Interop . Kernel32 . MAX_PATH < name . Length )
102
102
{
103
- throw new ArgumentException ( SR . Format ( SR . Argument_WaitHandleNameTooLong , name , Path . MaxPath ) , nameof ( name ) ) ;
103
+ throw new ArgumentException ( SR . Format ( SR . Argument_WaitHandleNameTooLong , name , Interop . Kernel32 . MAX_PATH ) , nameof ( name ) ) ;
104
104
}
105
105
#endif
106
106
}
@@ -184,9 +184,9 @@ private static OpenExistingResult OpenExistingWorker(string name, EventWaitHandl
184
184
throw new ArgumentException ( SR . Argument_EmptyName , nameof ( name ) ) ;
185
185
}
186
186
187
- if ( null != name && System . IO . Path . MaxPath < name . Length )
187
+ if ( null != name && Interop . Kernel32 . MAX_PATH < name . Length )
188
188
{
189
- throw new ArgumentException ( SR . Format ( SR . Argument_WaitHandleNameTooLong , name , Path . MaxPath ) , nameof ( name ) ) ;
189
+ throw new ArgumentException ( SR . Format ( SR . Argument_WaitHandleNameTooLong , name , Interop . Kernel32 . MAX_PATH ) , nameof ( name ) ) ;
190
190
}
191
191
192
192
0 commit comments