Class MessagingEventHub
A messaging event hub.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Messaging.Events
Assembly: Kephas.Messaging.dll
Syntax
[OverridePriority(Priority.BelowNormal)]
public class MessagingEventHub : DefaultEventHub, ILoggable, IEventHub, IDisposable, IMessagingEventHub
Constructors
| Improve this Doc View SourceMessagingEventHub(IMessageMatchService, IMessageHandlerRegistry)
Initializes a new instance of the MessagingEventHub class.
Declaration
public MessagingEventHub(IMessageMatchService messageMatchService, IMessageHandlerRegistry handlerRegistry)
Parameters
Type | Name | Description |
---|---|---|
IMessageMatchService | messageMatchService | The message match service. |
IMessageHandlerRegistry | handlerRegistry | The handler registry. |
Methods
| Improve this Doc View SourceGetEventContent(Object)
Gets the event content.
Declaration
protected override object GetEventContent(object event)
Parameters
Type | Name | Description |
---|---|---|
System.Object | event | The event. |
Returns
Type | Description |
---|---|
System.Object | The event content. |
Overrides
| Improve this Doc View SourceGetTypeMatch(ITypeInfo)
Gets the match for the provided event type.
Declaration
protected override Func<object, bool> GetTypeMatch(ITypeInfo typeMatch)
Parameters
Type | Name | Description |
---|---|---|
ITypeInfo | typeMatch | Specifies the type match criteria. |
Returns
Type | Description |
---|---|
System.Func<System.Object, System.Boolean> | A function delegate that yields a bool. |
Overrides
| Improve this Doc View SourceSubscribe(IMessageMatch, Func<Object, IContext, CancellationToken, Task>)
Subscribes to the event(s) matching the criteria.
Declaration
public virtual IEventSubscription Subscribe(IMessageMatch match, Func<object, IContext, CancellationToken, Task> callback)
Parameters
Type | Name | Description |
---|---|---|
IMessageMatch | match | Specifies the match criteria. |
System.Func<System.Object, IContext, System.Threading.CancellationToken, System.Threading.Tasks.Task> | callback | The callback. |
Returns
Type | Description |
---|---|
IEventSubscription | An IEventSubscription. |
Implements
System.IDisposable