<PackageReference Include="NUnit" Version="3.7.0" />

WorkShift

public class WorkShift
The dispatcher needs to do different things at different, non-overlapped times. For example, non-parallel tests may not be run at the same time as parallel tests. We model this using the metaphor of a working shift. The WorkShift class associates one or more WorkItemQueues with one or more TestWorkers. Work in the queues is processed until all queues are empty and all workers are idle. Both tests are needed because a worker that is busy may end up adding more work to one of the queues. At that point, the shift is over and another shift may begin. This cycle continues until all the tests have been run.
public bool HasWork { get; }

Gets a bool indicating whether this shift has any work to do

public bool IsActive { get; }

Gets a flag indicating whether the shift is currently active

public string Name { get; }

The Name of this shift

public IList<WorkItemQueue> Queues { get; }

Gets a list of the queues associated with this shift.

public IList<TestWorker> Workers { get; }

Gets the list of workers associated with this shift.

public event EventHandler EndOfShift

Event that fires when the shift has ended

public WorkShift(string name)

Construct a WorkShift

public void AddQueue(WorkItemQueue queue)

Add a WorkItemQueue to the shift, starting it if the shift is currently active.

public void Assign(TestWorker worker)

Assign a worker to the shift.

public void Cancel(bool force)

Cancel (abort or stop) the shift without completing all work

public void EndShift()

End the shift, pausing all queues and raising the EndOfShift event.

public void ShutDown()

Shut down the shift.

public void Start()

Start or restart processing for the shift