internal TaskHost(PSHost host, ConsoleState state, int taskId) { _host = host ?? throw new ArgumentNullException(nameof(host)); _ui = new TaskHostUI(host.UI, state, taskId); _id = Guid.NewGuid(); _name = $"Invoke-Concurrent[{taskId}]"; }
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); }