Interface IBusHelper
A helper for command and event buses.
Assembly: Cqrs.dll
Syntax
public interface IBusHelper
Methods
BuildActionHandler<TMessage>(Action<TMessage>, Boolean)
Build a message handler that implements telemetry capturing as well as off thread handling.
Declaration
Action<TMessage> BuildActionHandler<TMessage>(Action<TMessage> handler, bool holdMessageLock)where TMessage : IMessage
Parameters
Type |
Name |
Description |
System.Action<TMessage> |
handler |
|
System.Boolean |
holdMessageLock |
|
Returns
Type |
Description |
System.Action<TMessage> |
|
Type Parameters
Name |
Description |
TMessage |
|
BuildTelemeteredActionHandler<TMessage, TAuthenticationToken>(ITelemetryHelper, Action<TMessage>, Boolean, String)
Build a message handler that implements telemetry capturing as well as off thread handling.
Declaration
Action<TMessage> BuildTelemeteredActionHandler<TMessage, TAuthenticationToken>(ITelemetryHelper telemetryHelper, Action<TMessage> handler, bool holdMessageLock, string source)where TMessage : IMessage
Parameters
Type |
Name |
Description |
cdmdotnet.Logging.ITelemetryHelper |
telemetryHelper |
|
System.Action<TMessage> |
handler |
|
System.Boolean |
holdMessageLock |
|
System.String |
source |
|
Returns
Type |
Description |
System.Action<TMessage> |
|
Type Parameters
Name |
Description |
TMessage |
|
TAuthenticationToken |
|
IsEventRequired(String)
Checks if a white-list or black-list approach is taken, then checks the IConfigurationManager to see if a key exists defining if the event is required or not.
If the event is required and it cannot be resolved, an error will be raised.
Otherwise the event will be marked as processed.
Declaration
bool IsEventRequired(string configurationKey)
Parameters
Type |
Name |
Description |
System.String |
configurationKey |
The configuration key to check.
|
Returns
Type |
Description |
System.Boolean |
|
IsEventRequired(Type)
Checks if a white-list or black-list approach is taken, then checks the IConfigurationManager to see if a key exists defining if the event is required or not.
If the event is required and it cannot be resolved, an error will be raised.
Otherwise the event will be marked as processed.
Declaration
bool IsEventRequired(Type messageType)
Parameters
Type |
Name |
Description |
System.Type |
messageType |
The System.Type of the message being processed.
|
Returns
Type |
Description |
System.Boolean |
|