[corlib] Import System.Threading.WaitHandle
[mono.git] / mcs / class / corlib / System.Threading / EventWaitHandle.cs
index 7d1668ca8381ba4009a12f9a5d06f987cad8776f..599a37bfe1ec14a2c5436631123fe9755fd01b6b 100644 (file)
@@ -207,6 +207,20 @@ namespace System.Threading
                                return (NativeEventCalls.SetEvent_internal (Handle));
                        }
                }
+
+               internal void CheckDisposed ()
+               {
+                       if (disposed)
+                               throw new ObjectDisposedException (GetType ().FullName);
+               }
+
+               bool disposed;
+               protected override void Dispose(bool explicitDisposing)
+               {
+                       base.Dispose (explicitDisposing);
+                       disposed = true;
+               }
+
 #if !NET_2_1
                public void SetAccessControl (EventWaitHandleSecurity eventSecurity)
                {