MessageBus Class

Relays the messages from publishers to subscribers. MessageBus instance handles publishers and subscribers registering and unregistering, hosts sequences for each message name and executes message when publisher requests.

Definition

Namespace: SecretNest.MessageBus
Assembly: SecretNest.MessageBus.DirectRelease (in SecretNest.MessageBus.DirectRelease.dll) Version: 1.0.0
C#
public sealed class MessageBus : MessageBusBase
Inheritance
Object    MessageBusBase    MessageBus

Constructors

MessageBusInitializes a new instance of the MessageBus class

Properties

AutoShrink Gets or sets whether should remove the sequencer when the last related publisher is removed. Default value is .

Methods

DisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from MessageBusBase)
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
ExecuteOnceTParameter(String, TParameter, MessageBusPublisherOptionsTParameter) Executes as publisher specified by message name with the argument provided.
(Overrides MessageBusBaseExecuteOnceTParameter(String, TParameter, MessageBusPublisherOptionsTParameter))
ExecuteOnceTParameter(String, TParameter, MessageBusPublisherOptionsTParameter) Executes as publisher specified by message name with the argument provided.
(Inherited from MessageBusBase)
ExecuteOnceAndGetMessageInstanceTParameter(String, TParameter, MessageInstance, MessageBusPublisherOptionsTParameter) Executes as publisher specified by message name with the argument provided and get the instance information of this executing.
(Overrides MessageBusBaseExecuteOnceAndGetMessageInstanceTParameter(String, TParameter, MessageInstance, MessageBusPublisherOptionsTParameter))
ExecuteOnceAndGetMessageInstanceTParameter(String, TParameter, MessageInstance, MessageBusPublisherOptionsTParameter) Executes as publisher specified by message name with the argument provided and get the instance information of this executing.
(Inherited from MessageBusBase)
ExecuteOnceAndGetMessageInstanceAsyncTParameter(String, TParameter, MessageBusPublisherOptionsTParameter, NullableCancellationToken) Asynchronously executes as publisher specified by message name with the argument provided and get the instance information of this executing.
(Overrides MessageBusBaseExecuteOnceAndGetMessageInstanceAsyncTParameter(String, TParameter, MessageBusPublisherOptionsTParameter, NullableCancellationToken))
ExecuteOnceAndGetMessageInstanceAsyncTParameter(String, TParameter, MessageBusPublisherOptionsTParameter, NullableCancellationToken) Asynchronously executes as publisher specified by message name with the argument provided and get the instance information of this executing.
(Inherited from MessageBusBase)
ExecuteOnceAndGetMessageInstanceWithReturnTParameter, TReturn(String, TParameter, MessageInstance, MessageBusPublisherOptionsTParameter, TReturn) Executes as publisher specified by message name with the argument provided and get the return value with the instance information of this executing.
(Overrides MessageBusBaseExecuteOnceAndGetMessageInstanceWithReturnTParameter, TReturn(String, TParameter, MessageInstance, MessageBusPublisherOptionsTParameter, TReturn))
ExecuteOnceAndGetMessageInstanceWithReturnTParameter, TReturn(String, TParameter, MessageInstance, MessageBusPublisherOptionsTParameter, TReturn) Executes as publisher specified by message name with the argument provided and get the return value with the instance information of this executing.
(Inherited from MessageBusBase)
ExecuteOnceAndGetMessageInstanceWithReturnAsyncTParameter, TReturn(String, TParameter, MessageBusPublisherOptionsTParameter, TReturn, NullableCancellationToken) Asynchronously executes as publisher specified by message name with the argument provided and get the return value with the instance information of this executing.
(Overrides MessageBusBaseExecuteOnceAndGetMessageInstanceWithReturnAsyncTParameter, TReturn(String, TParameter, MessageBusPublisherOptionsTParameter, TReturn, NullableCancellationToken))
ExecuteOnceAndGetMessageInstanceWithReturnAsyncTParameter, TReturn(String, TParameter, MessageBusPublisherOptionsTParameter, TReturn, NullableCancellationToken) Asynchronously executes as publisher specified by message name with the argument provided and get the return value with the instance information of this executing.
(Inherited from MessageBusBase)
ExecuteOnceAsyncTParameter(String, TParameter, MessageBusPublisherOptionsTParameter, NullableCancellationToken) Asynchronously executes as publisher specified by message name with the argument provided.
(Overrides MessageBusBaseExecuteOnceAsyncTParameter(String, TParameter, MessageBusPublisherOptionsTParameter, NullableCancellationToken))
ExecuteOnceAsyncTParameter(String, TParameter, MessageBusPublisherOptionsTParameter, NullableCancellationToken) Asynchronously executes as publisher specified by message name with the argument provided.
(Inherited from MessageBusBase)
ExecuteOnceWithReturnTParameter, TReturn(String, TParameter, MessageBusPublisherOptionsTParameter, TReturn) Executes as publisher specified by message name with the argument provided and get the return value.
(Overrides MessageBusBaseExecuteOnceWithReturnTParameter, TReturn(String, TParameter, MessageBusPublisherOptionsTParameter, TReturn))
ExecuteOnceWithReturnTParameter, TReturn(String, TParameter, MessageBusPublisherOptionsTParameter, TReturn) Executes as publisher specified by message name with the argument provided and get the return value.
(Inherited from MessageBusBase)
ExecuteOnceWithReturnAsyncTParameter, TReturn(String, TParameter, MessageBusPublisherOptionsTParameter, TReturn, NullableCancellationToken) Asynchronously executes as publisher specified by message name with the argument provided and get the return value.
(Overrides MessageBusBaseExecuteOnceWithReturnAsyncTParameter, TReturn(String, TParameter, MessageBusPublisherOptionsTParameter, TReturn, NullableCancellationToken))
ExecuteOnceWithReturnAsyncTParameter, TReturn(String, TParameter, MessageBusPublisherOptionsTParameter, TReturn, NullableCancellationToken) Asynchronously executes as publisher specified by message name with the argument provided and get the return value.
(Inherited from MessageBusBase)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
RegisterPublisherTParameter(String, MessageBusPublisherOptionsTParameter) Register a publisher with parameter without return value.
(Overrides MessageBusBaseRegisterPublisherTParameter(String, MessageBusPublisherOptionsTParameter))
RegisterPublisherTParameter(String, MessageBusPublisherOptionsTParameter) Register a publisher with parameter without return value.
(Inherited from MessageBusBase)
RegisterPublisherTParameter, TReturn(String, MessageBusPublisherOptionsTParameter, TReturn) Register a publisher with parameter and return value.
(Overrides MessageBusBaseRegisterPublisherTParameter, TReturn(String, MessageBusPublisherOptionsTParameter, TReturn))
RegisterPublisherTParameter, TReturn(String, MessageBusPublisherOptionsTParameter, TReturn) Register a publisher with parameter and return value.
(Inherited from MessageBusBase)
RegisterSubscriberTParameter(MessageNameMatcherBase, SubscriberTParameter, MessageBusSubscriberOptionsTParameter) Register a subscriber with parameter using the message name matcher specified.
(Overrides MessageBusBaseRegisterSubscriberTParameter(MessageNameMatcherBase, SubscriberTParameter, MessageBusSubscriberOptionsTParameter))
RegisterSubscriberTParameter(MessageNameMatcherBase, SubscriberAsyncTParameter, MessageBusSubscriberOptionsTParameter) Register a subscriber with parameter and return value using the message name matcher specified.
(Overrides MessageBusBaseRegisterSubscriberTParameter(MessageNameMatcherBase, SubscriberAsyncTParameter, MessageBusSubscriberOptionsTParameter))
RegisterSubscriberTParameter(MessageNameMatcherBase, SubscriberWithMessageInstanceTParameter, MessageBusSubscriberOptionsTParameter) Register a subscriber with parameter using the message name matcher specified.
(Overrides MessageBusBaseRegisterSubscriberTParameter(MessageNameMatcherBase, SubscriberWithMessageInstanceTParameter, MessageBusSubscriberOptionsTParameter))
RegisterSubscriberTParameter(MessageNameMatcherBase, SubscriberWithMessageInstanceAsyncTParameter, MessageBusSubscriberOptionsTParameter) Register a subscriber with parameter and return value using the message name matcher specified.
(Overrides MessageBusBaseRegisterSubscriberTParameter(MessageNameMatcherBase, SubscriberWithMessageInstanceAsyncTParameter, MessageBusSubscriberOptionsTParameter))
RegisterSubscriberTParameter(MessageNameMatcherBase, SubscriberTParameter, MessageBusSubscriberOptionsTParameter) Register a subscriber with parameter using the message name matcher specified.
(Inherited from MessageBusBase)
RegisterSubscriberTParameter(MessageNameMatcherBase, SubscriberAsyncTParameter, MessageBusSubscriberOptionsTParameter) Register a subscriber with parameter and return value using the message name matcher specified.
(Inherited from MessageBusBase)
RegisterSubscriberTParameter(MessageNameMatcherBase, SubscriberWithMessageInstanceTParameter, MessageBusSubscriberOptionsTParameter) Register a subscriber with parameter using the message name matcher specified.
(Inherited from MessageBusBase)
RegisterSubscriberTParameter(MessageNameMatcherBase, SubscriberWithMessageInstanceAsyncTParameter, MessageBusSubscriberOptionsTParameter) Register a subscriber with parameter and return value using the message name matcher specified.
(Inherited from MessageBusBase)
RegisterSubscriberTParameter(String, SubscriberTParameter, MessageBusSubscriberOptionsTParameter) Register a subscriber with parameter with the message name specified.
(Overrides MessageBusBaseRegisterSubscriberTParameter(String, SubscriberTParameter, MessageBusSubscriberOptionsTParameter))
RegisterSubscriberTParameter(String, SubscriberAsyncTParameter, MessageBusSubscriberOptionsTParameter) Register a subscriber with parameter and return value with the message name specified.
(Overrides MessageBusBaseRegisterSubscriberTParameter(String, SubscriberAsyncTParameter, MessageBusSubscriberOptionsTParameter))
RegisterSubscriberTParameter(String, SubscriberWithMessageInstanceTParameter, MessageBusSubscriberOptionsTParameter) Register a subscriber with parameter with the message name specified.
(Overrides MessageBusBaseRegisterSubscriberTParameter(String, SubscriberWithMessageInstanceTParameter, MessageBusSubscriberOptionsTParameter))
RegisterSubscriberTParameter(String, SubscriberWithMessageInstanceAsyncTParameter, MessageBusSubscriberOptionsTParameter) Register a subscriber with parameter and return value with the message name specified.
(Overrides MessageBusBaseRegisterSubscriberTParameter(String, SubscriberWithMessageInstanceAsyncTParameter, MessageBusSubscriberOptionsTParameter))
RegisterSubscriberTParameter(String, SubscriberTParameter, MessageBusSubscriberOptionsTParameter) Register a subscriber with parameter with the message name specified.
(Inherited from MessageBusBase)
RegisterSubscriberTParameter(String, SubscriberAsyncTParameter, MessageBusSubscriberOptionsTParameter) Register a subscriber with parameter and return value with the message name specified.
(Inherited from MessageBusBase)
RegisterSubscriberTParameter(String, SubscriberWithMessageInstanceTParameter, MessageBusSubscriberOptionsTParameter) Register a subscriber with parameter with the message name specified.
(Inherited from MessageBusBase)
RegisterSubscriberTParameter(String, SubscriberWithMessageInstanceAsyncTParameter, MessageBusSubscriberOptionsTParameter) Register a subscriber with parameter and return value with the message name specified.
(Inherited from MessageBusBase)
RegisterSubscriberTParameter, TReturn(MessageNameMatcherBase, SubscriberTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Register a subscriber with parameter and return value using the message name matcher specified.
(Overrides MessageBusBaseRegisterSubscriberTParameter, TReturn(MessageNameMatcherBase, SubscriberTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn))
RegisterSubscriberTParameter, TReturn(MessageNameMatcherBase, SubscriberAsyncTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Register a subscriber with parameter and return value using the message name matcher specified.
(Overrides MessageBusBaseRegisterSubscriberTParameter, TReturn(MessageNameMatcherBase, SubscriberAsyncTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn))
RegisterSubscriberTParameter, TReturn(MessageNameMatcherBase, SubscriberWithMessageInstanceTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Register a subscriber with parameter and return value using the message name matcher specified.
(Overrides MessageBusBaseRegisterSubscriberTParameter, TReturn(MessageNameMatcherBase, SubscriberWithMessageInstanceTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn))
RegisterSubscriberTParameter, TReturn(MessageNameMatcherBase, SubscriberWithMessageInstanceAsyncTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Register a subscriber with parameter and return value using the message name matcher specified.
(Overrides MessageBusBaseRegisterSubscriberTParameter, TReturn(MessageNameMatcherBase, SubscriberWithMessageInstanceAsyncTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn))
RegisterSubscriberTParameter, TReturn(MessageNameMatcherBase, SubscriberTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Register a subscriber with parameter and return value using the message name matcher specified.
(Inherited from MessageBusBase)
RegisterSubscriberTParameter, TReturn(MessageNameMatcherBase, SubscriberAsyncTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Register a subscriber with parameter and return value using the message name matcher specified.
(Inherited from MessageBusBase)
RegisterSubscriberTParameter, TReturn(MessageNameMatcherBase, SubscriberWithMessageInstanceTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Register a subscriber with parameter and return value using the message name matcher specified.
(Inherited from MessageBusBase)
RegisterSubscriberTParameter, TReturn(MessageNameMatcherBase, SubscriberWithMessageInstanceAsyncTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Register a subscriber with parameter and return value using the message name matcher specified.
(Inherited from MessageBusBase)
RegisterSubscriberTParameter, TReturn(String, SubscriberTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Register a subscriber with parameter and return value with the message name specified.
(Overrides MessageBusBaseRegisterSubscriberTParameter, TReturn(String, SubscriberTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn))
RegisterSubscriberTParameter, TReturn(String, SubscriberAsyncTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Register a subscriber with parameter and return value with the message name specified.
(Overrides MessageBusBaseRegisterSubscriberTParameter, TReturn(String, SubscriberAsyncTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn))
RegisterSubscriberTParameter, TReturn(String, SubscriberWithMessageInstanceTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Register a subscriber with parameter and return value with the message name specified.
(Overrides MessageBusBaseRegisterSubscriberTParameter, TReturn(String, SubscriberWithMessageInstanceTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn))
RegisterSubscriberTParameter, TReturn(String, SubscriberWithMessageInstanceAsyncTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Register a subscriber with parameter and return value with the message name specified.
(Overrides MessageBusBaseRegisterSubscriberTParameter, TReturn(String, SubscriberWithMessageInstanceAsyncTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn))
RegisterSubscriberTParameter, TReturn(String, SubscriberTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Register a subscriber with parameter and return value with the message name specified.
(Inherited from MessageBusBase)
RegisterSubscriberTParameter, TReturn(String, SubscriberAsyncTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Register a subscriber with parameter and return value with the message name specified.
(Inherited from MessageBusBase)
RegisterSubscriberTParameter, TReturn(String, SubscriberWithMessageInstanceTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Register a subscriber with parameter and return value with the message name specified.
(Inherited from MessageBusBase)
RegisterSubscriberTParameter, TReturn(String, SubscriberWithMessageInstanceAsyncTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Register a subscriber with parameter and return value with the message name specified.
(Inherited from MessageBusBase)
ShrinkSequencers Removes all sequencers those no publisher is attached.
ToStringReturns a string that represents the current object.
(Inherited from Object)
UnregisterPublisher(Guid) Unregister a publisher.
(Overrides MessageBusBaseUnregisterPublisher(Guid))
UnregisterPublisher(PublisherTicketBase) Unregister a publisher.
(Overrides MessageBusBaseUnregisterPublisher(PublisherTicketBase))
UnregisterSubscriber(Guid) Unregister a subscriber.
(Overrides MessageBusBaseUnregisterSubscriber(Guid))
UnregisterSubscriber(SubscriberTicketBase) Unregister a subscriber.
(Overrides MessageBusBaseUnregisterSubscriber(SubscriberTicketBase))

See Also