Show / Hide Table of Contents

Class FuncMessageHandler<TMessage>

A function message handler.

Inheritance
System.Object
Loggable
MessageHandlerBase<TMessage, IMessage>
FuncMessageHandler<TMessage>
Implements
ILoggable
IMessageHandler<TMessage>
IMessageHandler
System.IDisposable
Inherited Members
MessageHandlerBase<TMessage, IMessage>.ProcessAsync(TMessage, IMessagingContext, CancellationToken)
MessageHandlerBase<TMessage, IMessage>.IMessageHandler<TMessage>.ProcessAsync(TMessage, IMessagingContext, CancellationToken)
MessageHandlerBase<TMessage, IMessage>.IMessageHandler.ProcessAsync(IMessage, IMessagingContext, CancellationToken)
MessageHandlerBase<TMessage, IMessage>.Dispose()
MessageHandlerBase<TMessage, IMessage>.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
Assembly: Kephas.Messaging.dll
Syntax
public class FuncMessageHandler<TMessage> : MessageHandlerBase<TMessage, IMessage>, ILoggable, IMessageHandler<TMessage>, IMessageHandler, IDisposable where TMessage : class
Type Parameters
Name Description
TMessage

Type of the message.

Constructors

| Improve this Doc View Source

FuncMessageHandler(Func<TMessage, IMessagingContext, CancellationToken, Task<IMessage>>)

Initializes a new instance of the FuncMessageHandler<TMessage> class.

Declaration
public FuncMessageHandler(Func<TMessage, IMessagingContext, CancellationToken, Task<IMessage>> handlerFunction)
Parameters
Type Name Description
System.Func<TMessage, IMessagingContext, System.Threading.CancellationToken, System.Threading.Tasks.Task<IMessage>> handlerFunction

The handler function.

Methods

| Improve this Doc View Source

ProcessAsync(TMessage, IMessagingContext, CancellationToken)

Processes the provided message asynchronously and returns a response promise.

Declaration
public override Task<IMessage> ProcessAsync(TMessage message, IMessagingContext context, CancellationToken token)
Parameters
Type Name Description
TMessage message

The message to be handled.

IMessagingContext context

The processing context.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IMessage>

The response promise.

Overrides
Kephas.Messaging.MessageHandlerBase<TMessage, Kephas.Messaging.IMessage>.ProcessAsync(TMessage, Kephas.Messaging.IMessagingContext, System.Threading.CancellationToken)

Implements

ILoggable
IMessageHandler<TMessage>
IMessageHandler
System.IDisposable

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)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX