// adds a conditional action to the queue public TaskQueue ThenWaitUntil(UntilTaskPredicate condition) { Step s = NewStep(); s.Type = StepType.ConditionWait; s.Condition = condition; steps.Enqueue(s); return(this); }
public TaskQueue WaitUntil(UntilTaskPredicate condition) { // find a cached queue or make a new one TaskQueue queue = queueCache.Count > 0 ? queueCache.Pop() : new TaskQueue(); // store the queue in our active list queues.Add(queue); // queue up a conditional action and hand it back to the caller return queue.ThenWaitUntil(condition); }
public TaskQueue WaitUntil(UntilTaskPredicate condition) { // find a cached queue or make a new one TaskQueue queue = queueCache.Count > 0 ? queueCache.Pop() : new TaskQueue(); // store the queue in our active list queues.Add(queue); // queue up a conditional action and hand it back to the caller return(queue.ThenWaitUntil(condition)); }
// adds a conditional action to the queue public TaskQueue ThenWaitUntil(UntilTaskPredicate condition) { Step s = NewStep(); s.Type = StepType.ConditionWait; s.Condition = condition; steps.Enqueue(s); return this; }