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