Table of Contents

Class AggregateMessageSink

Namespace
Xunit.Runner.Common
Assembly
xunit.v3.runner.common.dll

An implementation of IMessageSink which dispatches messages to one or more individual message sinks.

public class AggregateMessageSink : IMessageSink, IAsyncDisposable
Inheritance
AggregateMessageSink
Implements
Derived
Inherited Members

Properties

AggregatedSinks

The list of event dispatchers that are registered with the system.

protected List<IMessageSink> AggregatedSinks { get; }

Property Value

List<IMessageSink>

Methods

DisposeAsync()

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

public virtual ValueTask DisposeAsync()

Returns

ValueTask

GetOrCreateAggregatedSink<TDispatcher>(ref TDispatcher?)

Gets a dispatcher, optionally creating and registering it if it doesn't exist.

protected TDispatcher GetOrCreateAggregatedSink<TDispatcher>(ref TDispatcher? value) where TDispatcher : class, IMessageSink, new()

Parameters

value TDispatcher

The dispatcher

Returns

TDispatcher

The dispatcher

Type Parameters

TDispatcher

The type of the dispatcher

OnMessage(IMessageSinkMessage)

Reports the presence of a message on the message bus. This method should never throw exceptions.

public virtual bool OnMessage(IMessageSinkMessage message)

Parameters

message IMessageSinkMessage

The message from the message bus

Returns

bool

Return true to continue running tests, or false to stop.