Class DelegatingMessageBus
Implementation of IMessageBus that delegates to another implementation of IMessageBus while calling into an optional callback for each message.
public class DelegatingMessageBus : IMessageBus, IDisposable
- Inheritance
-
DelegatingMessageBus
- Implements
- Derived
- Inherited Members
Constructors
DelegatingMessageBus(IMessageBus, Action<IMessageSinkMessage>?)
Implementation of IMessageBus that delegates to another implementation of IMessageBus while calling into an optional callback for each message.
public DelegatingMessageBus(IMessageBus innerMessageBus, Action<IMessageSinkMessage>? callback = null)
Parameters
innerMessageBusIMessageBusThe message bus to delegate to.
callbackAction<IMessageSinkMessage>The callback to send messages to.
Methods
Dispose()
public void Dispose()
QueueMessage(IMessageSinkMessage)
Queues a message to be sent to the runner.
public virtual bool QueueMessage(IMessageSinkMessage message)
Parameters
messageIMessageSinkMessageThe message to be sent to the runner
Returns
- bool
Returns
trueif discovery/execution should continue;false, otherwise. The return value may be safely ignored by components which are not directly responsible for discovery or execution, and this is intended to communicate to those sub-systems that that they should short circuit and stop their work as quickly as is reasonable.