Пример #1
0
 private void StartAction(RunnableAction runnableAction)
 {
   LongRunningAction runningAction = runnableAction.Invocation() as LongRunningAction;
   runnableAction.Invocation = (Func<object>) null;
   if (runningAction == null)
     return;
   runningAction.Ended += (Action) (() =>
   {
     this.runningActions.Remove(runningAction);
     if (!runnableAction.Action.Killswitch)
       return;
     this.Dispose();
   });
   this.runningActions.Add(runningAction);
 }
Пример #2
0
        private void StartAction(RunnableAction runnableAction)
        {
            LongRunningAction runningAction = runnableAction.Invocation() as LongRunningAction;

            runnableAction.Invocation = (Func <object>)null;
            if (runningAction == null)
            {
                return;
            }
            runningAction.Ended += (Action)(() =>
            {
                this.runningActions.Remove(runningAction);
                if (!runnableAction.Action.Killswitch)
                {
                    return;
                }
                this.Dispose();
            });
            this.runningActions.Add(runningAction);
        }
Пример #3
0
 public void EnqueueAction(RunnableAction runnableAction)
 {
   this.queuedActions.Enqueue(runnableAction);
 }
Пример #4
0
 public void EnqueueAction(RunnableAction runnableAction)
 {
     this.queuedActions.Enqueue(runnableAction);
 }