Class MessageHandlerRegistryExtensions
A message handler registry extensions.
Inheritance
System.Object
    MessageHandlerRegistryExtensions
  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
public static class MessageHandlerRegistryExtensionsMethods
| Improve this Doc View SourceRegisterHandler<TMessage>(IMessageHandlerRegistry, Func<TMessage, IMessagingContext, IMessage>)
Registers the handler.
Declaration
public static IMessageHandlerRegistry RegisterHandler<TMessage>(this IMessageHandlerRegistry this, Func<TMessage, IMessagingContext, IMessage> handlerFunction)
    where TMessage : classParameters
| Type | Name | Description | 
|---|---|---|
| IMessageHandlerRegistry | this | The registry to act on. | 
| System.Func<TMessage, IMessagingContext, IMessage> | handlerFunction | The synchronous handler function. | 
Returns
| Type | Description | 
|---|---|
| IMessageHandlerRegistry | This message handler registry. | 
Type Parameters
| Name | Description | 
|---|---|
| TMessage | Type of the message. | 
RegisterHandler<TMessage>(IMessageHandlerRegistry, Func<TMessage, IMessagingContext, CancellationToken, Task<IMessage>>)
Registers the handler.
Declaration
public static IMessageHandlerRegistry RegisterHandler<TMessage>(this IMessageHandlerRegistry this, Func<TMessage, IMessagingContext, CancellationToken, Task<IMessage>> handlerFunction)
    where TMessage : classParameters
| Type | Name | Description | 
|---|---|---|
| IMessageHandlerRegistry | this | The registry to act on. | 
| System.Func<TMessage, IMessagingContext, System.Threading.CancellationToken, System.Threading.Tasks.Task<IMessage>> | handlerFunction | The handler function. | 
Returns
| Type | Description | 
|---|---|
| IMessageHandlerRegistry | This message handler registry. | 
Type Parameters
| Name | Description | 
|---|---|
| TMessage | Type of the message. |