Show / Hide Table of Contents

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 MessageHandlerRegistryExtensions

Methods

| Improve this Doc View Source

RegisterHandler<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 : class
Parameters
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.

| Improve this Doc View Source

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 : class
Parameters
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.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX