Exemple #1
0
    // 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);
    }
Exemple #2
0
        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);
        }
Exemple #3
0
    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));
    }
Exemple #4
0
 // 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;
 }