Show / Hide Table of Contents

Class MessagingEventHub

A messaging event hub.

Inheritance
System.Object
Loggable
DefaultEventHub
MessagingEventHub
Implements
ILoggable
IEventHub
System.IDisposable
IMessagingEventHub
Inherited Members
DefaultEventHub.PublishAsync(Object, IContext, CancellationToken)
DefaultEventHub.Subscribe(Func<Object, Boolean>, Func<Object, IContext, CancellationToken, Task>)
DefaultEventHub.Subscribe(ITypeInfo, Func<Object, IContext, CancellationToken, Task>)
DefaultEventHub.Dispose()
DefaultEventHub.Dispose(Boolean)
Loggable.Logger
Loggable.GetLogger()
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 Source

MessagingEventHub(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 Source

GetEventContent(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
DefaultEventHub.GetEventContent(Object)
| Improve this Doc View Source

GetTypeMatch(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
DefaultEventHub.GetTypeMatch(ITypeInfo)
| Improve this Doc View Source

Subscribe(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

ILoggable
IEventHub
System.IDisposable
IMessagingEventHub

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
MessagingEventHubExtensions.Subscribe<TEvent>(IEventHub, Func<TEvent, IContext, CancellationToken, Task>, MessageTypeMatching)
MessagingEventHubExtensions.Subscribe<TEvent>(IEventHub, Action<TEvent, IContext>, MessageTypeMatching)
MessagingEventHubExtensions.Subscribe(IEventHub, IMessageMatch, Func<Object, IContext, CancellationToken, Task>)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX