Table of Contents

Interface IWorkItemDispatcher

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

An IWorkItemDispatcher handles execution of work items.

public interface IWorkItemDispatcher

Properties

LevelOfParallelism

The level of parallelism supported. Zero if not supported.

int LevelOfParallelism { get; }

Property Value

int

Methods

CancelRun(bool)

Cancel the ongoing run completely. If no run is in process, the call has no effect.

void CancelRun(bool force)

Parameters

force bool

true if the IWorkItemDispatcher should abort all currently running WorkItems, false if it should allow all currently running WorkItems to complete

Dispatch(WorkItem)

Dispatch a single work item for execution. The first work item dispatched is saved as the top-level work item and used when stopping the run.

void Dispatch(WorkItem work)

Parameters

work WorkItem

The item to dispatch

Start(WorkItem)

Start execution, performing any initialization. Sets the top level work item and dispatches it.

void Start(WorkItem topLevelWorkItem)

Parameters

topLevelWorkItem WorkItem