Table of Contents

Class SimpleWorkItemDispatcher

Namespace
NUnit.Framework.Internal.Execution
Assembly
nunit.framework.dll

SimpleWorkItemDispatcher handles execution of WorkItems by directly executing them. It is provided so that a dispatcher is always available in the context, thereby simplifying the code needed to run child tests.

public class SimpleWorkItemDispatcher : IWorkItemDispatcher
Inheritance
SimpleWorkItemDispatcher
Implements
Inherited Members

Constructors

SimpleWorkItemDispatcher()

public SimpleWorkItemDispatcher()

Properties

LevelOfParallelism

The level of parallelism supported

public int LevelOfParallelism { get; }

Property Value

int

Methods

CancelRun(bool)

Cancel (abort or stop) the ongoing run. If no run is in process, the call has no effect.

public void CancelRun(bool force)

Parameters

force bool

true if the run should be aborted, false if it should allow its currently running test to complete

Dispatch(WorkItem)

Dispatch a single work item for execution by executing it directly.

public void Dispatch(WorkItem work)

Parameters

work WorkItem

The item to dispatch

Start(WorkItem)

Start execution, creating the execution thread, setting the top level work and dispatching it.

public void Start(WorkItem topLevelWorkItem)

Parameters

topLevelWorkItem WorkItem