private void RunChildren() { _childTestCountdown = new CountdownEvent(_children.Count); while (_children.Count > 0) { WorkItem child = (WorkItem)_children.Dequeue(); child.Completed += new EventHandler(OnChildCompleted); child.Execute(); } }
private static TestResult ExecuteAndWaitForResult(WorkItem work, TestExecutionContext context) { work.Execute(context); // TODO: Replace with an event while (work.State != WorkItemState.Complete) Thread.Sleep(1); return work.Result; }