Dispose(true);
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose ()
-#endif
{
Close ();
}
bool release = false;
try {
if (exitContext) {
-#if MONOTOUCH
- throw new NotSupportedException ("exitContext == true is not supported");
-#else
+#if !MONOTOUCH
SynchronizationAttribute.ExitContext ();
#endif
}
safe_wait_handle.DangerousAddRef (ref release);
return (WaitOne_internal(safe_wait_handle.DangerousGetHandle (), millisecondsTimeout, exitContext));
} finally {
+#if !MONOTOUCH
if (exitContext)
SynchronizationAttribute.EnterContext ();
+#endif
if (release)
safe_wait_handle.DangerousRelease ();
}
bool release = false;
try {
if (exitContext) {
-#if MONOTOUCH
- throw new NotSupportedException ("exitContext == true is not supported");
-#else
+#if !MONOTOUCH
SynchronizationAttribute.ExitContext ();
#endif
}
return (WaitOne_internal(safe_wait_handle.DangerousGetHandle (), (int) ms, exitContext));
}
finally {
+#if !MONOTOUCH
if (exitContext)
SynchronizationAttribute.EnterContext ();
+#endif
if (release)
safe_wait_handle.DangerousRelease ();
}