Esempio n. 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);
 }
Esempio n. 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);
        }
Esempio n. 3
0
 public void EnqueueAction(RunnableAction runnableAction)
 {
   this.queuedActions.Enqueue(runnableAction);
 }
Esempio n. 4
0
 public void EnqueueAction(RunnableAction runnableAction)
 {
     this.queuedActions.Enqueue(runnableAction);
 }