Class DefaultMessageHandlerRegistry
A default message handler registry.
Inheritance
System.Object
DefaultMessageHandlerRegistry
Implements
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
Assembly: Kephas.Messaging.dll
Syntax
[OverridePriority(Priority.Low)]
public class DefaultMessageHandlerRegistry : IMessageHandlerRegistry
Constructors
| Improve this Doc View SourceDefaultMessageHandlerRegistry(IMessageMatchService, IList<IExportFactory<IMessageHandlerSelector, AppServiceMetadata>>, IList<IExportFactory<IMessageHandler, MessageHandlerMetadata>>)
Initializes a new instance of the DefaultMessageHandlerRegistry class.
Declaration
public DefaultMessageHandlerRegistry(IMessageMatchService messageMatchService, IList<IExportFactory<IMessageHandlerSelector, AppServiceMetadata>> handlerSelectorFactories, IList<IExportFactory<IMessageHandler, MessageHandlerMetadata>> handlerFactories)
Parameters
Type | Name | Description |
---|---|---|
IMessageMatchService | messageMatchService | The message match service. |
System.Collections.Generic.IList<IExportFactory<IMessageHandlerSelector, AppServiceMetadata>> | handlerSelectorFactories | The handler selector factories. |
System.Collections.Generic.IList<IExportFactory<IMessageHandler, MessageHandlerMetadata>> | handlerFactories | The handler factories. |
Methods
| Improve this Doc View SourceRegisterHandler(IMessageHandler, MessageHandlerMetadata)
Registers the message handler.
Declaration
public IMessageHandlerRegistry RegisterHandler(IMessageHandler handler, MessageHandlerMetadata metadata)
Parameters
Type | Name | Description |
---|---|---|
IMessageHandler | handler | The handler. |
MessageHandlerMetadata | metadata | The handler metadata. |
Returns
Type | Description |
---|---|
IMessageHandlerRegistry | This message handler registry. |
ResolveMessageHandlers(IMessage)
Resolves the message handlers for the provided message.
Declaration
public virtual IEnumerable<IMessageHandler> ResolveMessageHandlers(IMessage message)
Parameters
Type | Name | Description |
---|---|---|
IMessage | message | The message. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMessageHandler> | The message handlers. |