public bool AsyncWaitHandle () { var d = new AnAction (DoAction); IAsyncResult ar = d.BeginInvoke (true, 1, null, null); do { } while (!ar.AsyncWaitHandle.WaitOne (10, true)); return d.EndInvoke (ar); }
public bool AsyncWaitHandle() { var d = new AnAction(DoAction); IAsyncResult ar = d.BeginInvoke(true, 1, null, null); do { } while (!ar.AsyncWaitHandle.WaitOne(10, true)); return(d.EndInvoke(ar)); }
public bool IsCompleted () { var d = new AnAction (DoAction); IAsyncResult ar = d.BeginInvoke (true, 1, null, null); do { Thread.Sleep (10); } while(!ar.IsCompleted); return d.EndInvoke (ar); }
public bool IsCompleted() { var d = new AnAction(DoAction); IAsyncResult ar = d.BeginInvoke(true, 1, null, null); do { Thread.Sleep(10); } while(!ar.IsCompleted); return(d.EndInvoke(ar)); }