public void AddContinuation(Task continuation) { if (Continuations == null) { Continuations = new WaitList(continuation); } else { Continuations.Add(continuation); } }
internal WaitTask(WaitList tasks, WaitOn waitOn, CancellationToken token) : base(token, null) { _waitList = tasks; switch (waitOn) { case WaitOn.Single: case WaitOn.All: _waitOn = waitOn; break; default: throw new ArgumentOutOfRangeException("waitOn"); } }