Rework ReaderWriterLockSlim to use simpler Interlocked arithmetic.
[mono.git] / mcs / class / corlib / System.Threading / ManualResetEvent.cs
index 31eaacf99043d2b97e0f6fbe5357d5c31c1a873d..b914e01910e5f2e7ec3c68faed1e010efd30b632 100644 (file)
 
 using System;
 using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
 
 namespace System.Threading 
 {
-
-       public sealed class ManualResetEvent :
-#if NET_2_0
-       EventWaitHandle
-#else
-       WaitHandle 
-#endif
+       [ComVisible (true)]
+       public sealed class ManualResetEvent : EventWaitHandle
        {
                // Constructor
-#if NET_2_0
                public ManualResetEvent (bool initialState)
                        : base(initialState, EventResetMode.ManualReset)
                {
                }
-#else
-               public ManualResetEvent (bool initialState)
-               {
-                       Handle = NativeEventCalls.CreateEvent_internal (true, initialState, null);
-               }
-#endif
 
                // Methods
 
@@ -63,7 +52,7 @@ namespace System.Threading
  * wants to use the Set method that has moved to EventWaitHandle in
  * the 2.0 profile
  */
-#if ONLY_1_1 || BOOTSTRAP_NET_2_0
+#if BOOTSTRAP_NET_2_0
                public bool Set()
                {
                        CheckDisposed ();