Table of Contents

Class ContextBase

Namespace
Xunit.v3
Assembly
xunit.v3.core.dll

Base class for all execution pipeline context classes.

public class ContextBase : IAsyncLifetime, IAsyncDisposable
Inheritance
ContextBase
Implements
Derived
Inherited Members

Constructors

ContextBase(ExplicitOption, IMessageBus, ExceptionAggregator, CancellationTokenSource)

Base class for all execution pipeline context classes.

public ContextBase(ExplicitOption explicitOption, IMessageBus messageBus, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource)

Parameters

explicitOption ExplicitOption

The user's choice on how to treat explicit tests

messageBus IMessageBus

The message bus to send execution messages to

aggregator ExceptionAggregator

The exception aggregator

cancellationTokenSource CancellationTokenSource

The cancellation token source

Properties

Aggregator

Gets the aggregator used for reporting exceptions.

public ExceptionAggregator Aggregator { get; }

Property Value

ExceptionAggregator

CancellationTokenSource

Gets the cancellation token source used for cancelling test execution.

public CancellationTokenSource CancellationTokenSource { get; }

Property Value

CancellationTokenSource

ExplicitOption

Gets a flag which indicates how explicit tests should be handled.

public ExplicitOption ExplicitOption { get; }

Property Value

ExplicitOption

MessageBus

Gets the message bus to send execution engine messages to.

public IMessageBus MessageBus { get; }

Property Value

IMessageBus

Methods

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

public virtual ValueTask DisposeAsync()

Returns

ValueTask

InitializeAsync()

Called immediately after the class has been created, before it is used.

public virtual ValueTask InitializeAsync()

Returns

ValueTask