public InvokeConcurrentCmdlet() { _tasks = new List <Task>(); _mainThread = new MainThreadDispatcher(); _console = new ConsoleState(); _exceptions = new ConcurrentBag <Exception>(); _cancellation = new CancellationTokenSource(); }
public TestHarness(int?taskId = null) { TaskId = taskId ?? Random.Next(); MockUI = Mocks.Create <PSHostUserInterface>(); ConsoleState = new ConsoleState { IsAtBol = Random.NextBool(), LastTaskId = Random.Next() }; TaskHostUI = new TaskHostUI(MockUI.Object, ConsoleState, TaskId); }