Esempio n. 1
0
        protected bool WaitAll(WaitHandle[] events, IWaitController waitCtrl)
        {
            var index =
                waitCtrl == null
                    ? WaitHandleUtils.WaitOneOrAllOthers(_disposeEvent, events)
                    : waitCtrl.WaitOneOrAllOthers(_disposeEvent, events);

            return(index != 0);
        }
Esempio n. 2
0
 public int WaitOneOrAllOthers(WaitHandle one, WaitHandle[] others) 
 { 
     var index = WaitHandleUtils.WaitOneOrTwoOrAllOthers(_interruptExecutionEvent, one, others); 
     if (index == 0) 
         throw new ActivityExecutionInterruptException(CurrentExecutingActivity, this); 
     return index == WaitHandle.WaitTimeout 
                ? index 
                : (index - 1); 
 }