Merge branch 'master' of github.com:mono/mono
[mono.git] / mcs / class / corlib / System.Threading / ManualResetEvent.cs
index ba7c6968f6850cfccc89c08f51dd0d6785cf8cdd..7aceafa482fb91eb722d807ff20059c1efbfb1d4 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)
-               {
-                       bool created;
-                       
-                       Handle = NativeEventCalls.CreateEvent_internal (true, initialState, null, out created);
-               }
-#endif
-
-               // Methods
-
-/* Need BOOTSTRAP_NET_2_0 because System.IO.FileStreamAsyncResult
- * wants to use the Set method that has moved to EventWaitHandle in
- * the 2.0 profile
- */
-#if ONLY_1_1 || BOOTSTRAP_NET_2_0
-               public bool Set()
-               {
-                       CheckDisposed ();
-                       return (NativeEventCalls.SetEvent_internal (Handle));
-               }
-
-               public bool Reset()
-               {
-                       CheckDisposed ();
-                       return(NativeEventCalls.ResetEvent_internal (Handle));
-               }
-#endif
        }
 }