using System;
using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
namespace System.Threading
{
- public sealed class AutoResetEvent :
-#if NET_2_0
- EventWaitHandle
-#else
- WaitHandle
-#endif
+ [ComVisible (true)]
+ public sealed class AutoResetEvent : EventWaitHandle
{
// Constructor
-#if NET_2_0
public AutoResetEvent (bool initialState)
: base(initialState, EventResetMode.AutoReset)
{
}
-#else
- public AutoResetEvent(bool initialState) {
- Handle = NativeEventCalls.CreateEvent_internal(false,initialState,null);
- }
-#endif
// Methods
* the Set and Reset methods that have 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 ();