Class BusHelper
Inheritance
System.Object
BusHelper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Cqrs.dll
Syntax
public class BusHelper : IBusHelper
Constructors
BusHelper(IConfigurationManager)
Declaration
public BusHelper(IConfigurationManager configurationManager)
Parameters
Properties
CachedChecks
A collection of System.Tuple`2 holding the configurations value (always a System.Boolean) and the System.DateTime
The value was last checked, keyed by it's configuration key.
Declaration
protected IDictionary<string, Tuple<bool, DateTime>> CachedChecks { get; }
Property Value
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Tuple<System.Boolean, System.DateTime>> |
|
ConfigurationManager
Declaration
protected IConfigurationManager ConfigurationManager { get; }
Property Value
EventBlackListProcessing
Declaration
protected bool EventBlackListProcessing { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
BuildActionHandler<TMessage>(Action<TMessage>, Boolean)
Build a message handler that implements telemetry capturing as well as off thread handling.
Declaration
public virtual 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 |
|
Implements
BuildTelemeteredActionHandler<TMessage, TAuthenticationToken>(ITelemetryHelper, Action<TMessage>, Boolean, String)
Build a message handler that implements telemetry capturing as well as off thread handling.
Declaration
public virtual 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 |
|
Implements
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
public virtual bool IsEventRequired(string configurationKey)
Parameters
Type |
Name |
Description |
System.String |
configurationKey |
The configuration key to check.
|
Returns
Type |
Description |
System.Boolean |
|
Implements
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
public virtual bool IsEventRequired(Type messageType)
Parameters
Type |
Name |
Description |
System.Type |
messageType |
The System.Type of the message being processed.
|
Returns
Type |
Description |
System.Boolean |
|
Implements
RefreshCachedChecks()
Declaration
protected virtual void RefreshCachedChecks()
StartRefreshCachedChecks()
Declaration
protected virtual void StartRefreshCachedChecks()