Class AggregateMessageSink
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
Methods
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
public virtual ValueTask DisposeAsync()
Returns
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
valueTDispatcherThe dispatcher
Returns
- TDispatcher
The dispatcher
Type Parameters
TDispatcherThe 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
messageIMessageSinkMessageThe message from the message bus
Returns
- bool
Return
trueto continue running tests, orfalseto stop.