public static bool SignalAndWait( Original::WaitHandle toSignal, Original::WaitHandle toWaitOn, TimeSpan timeout, bool exitContext) { return(SignalAndWait(toSignal, toWaitOn, (int)timeout.TotalMilliseconds, exitContext)); }
public static bool SignalAndWait( Original::WaitHandle toSignal, Original::WaitHandle toWaitOn, TimeSpan timeout, bool exitContext) { throw new NotImplementedException(); }
public static bool WaitOne(Original::WaitHandle h, TimeSpan timeout, bool exitContext) { if (h == null) { throw new NullReferenceException(); } return(WaitOne(h, (int)timeout.TotalMilliseconds, exitContext)); }
public static bool WaitOne(Original::WaitHandle h, TimeSpan timeout) { if (h == null) { throw new NullReferenceException(); } return(WaitOne(h, timeout, false)); }
public static bool WaitOne(Original::WaitHandle h, int millisecondsTimeout) { if (h == null) { throw new NullReferenceException(); } return(WaitOne(h, millisecondsTimeout, false)); }
public static bool WaitOne(Original::WaitHandle h, int millisecondsTimeout, bool exitContext) { if (h == null) { throw new NullReferenceException(); } var ah = new Original::WaitHandle[] { h }; return(WaitHandleHelper.WaitGeneral(ah, millisecondsTimeout, exitContext, "WaitOne") != Original::WaitHandle.WaitTimeout); }
// SignalObjectAndWait(h1,h2, x, y) is equivalent to // r = SignalObjectAndWait(h1, h2, 0, y); // if(r == WAIT_TIMEOUT && x == INFINITE) // WaitForSingleObject(h2, x, y); // public static bool SignalAndWait( Original::WaitHandle toSignal, Original::WaitHandle toWaitOn, int millisecondsTimeout, bool exitContext) { return(Helper.SimpleWrap <bool>( delegate(ClrSyncManager manager) { if (toSignal == null) { throw new NullReferenceException(); } if (toWaitOn == null) { throw new ArgumentNullException(); } if (millisecondsTimeout < Timeout.Infinite) { throw new ArgumentOutOfRangeException(); } var ao = new object[] { toSignal, toWaitOn }; manager.SetMethodInfo("WaitHandle.SignalAndWait"); manager.AggregateSyncVarAccess(ao, MSyncVarOp.RWVAR_READWRITE); bool ret = Original::WaitHandle.SignalAndWait(toSignal, toWaitOn, 0, false); if (!ret) { manager.MarkTimeout(); } manager.CommitSyncVarAccess(); if (ret) { return true; } if (!(millisecondsTimeout <= Timeout.Infinite)) { manager.TaskYield(); return false; } var ah = new Original::WaitHandle[] { toWaitOn }; return (WaitHandleHelper.WaitGeneralRaw(manager, ah, millisecondsTimeout, exitContext, "WaitOne") != Original::WaitHandle.WaitTimeout); }, delegate() { return Original::WaitHandle.SignalAndWait(toSignal, toWaitOn, millisecondsTimeout, exitContext); })); }
public static bool SignalAndWait(Original::WaitHandle toSignal, Original::WaitHandle toWaitOn) { throw new NotImplementedException(); }
public static bool WaitOne(Original::WaitHandle waitHandle, TimeSpan timeout, bool exitContext) { throw new NotImplementedException(); }
public static bool WaitOne(Original::WaitHandle waitHandle, int millisecondsTimeout, bool exitContext) { throw new NotImplementedException(); }
// the following code should never be called, as WaitHandle is the base class for EventWaitHandle public static bool WaitOne(Original::WaitHandle h) { throw new NotImplementedException(); }
public static bool SignalAndWait(Original::WaitHandle toSignal, Original::WaitHandle toWaitOn) { return(SignalAndWait(toSignal, toWaitOn, Timeout.Infinite, false)); }
public static bool Dispose(Original::Timer t, Original::WaitHandle h) { throw new NotImplementedException("Timer.Dispose(WaitHandle)"); }