Show / Hide Table of Contents

Class MessageHandlerBase<TMessage, TResponse>

Provides a base implementation of a message handler.

Inheritance
System.Object
Loggable
MessageHandlerBase<TMessage, TResponse>
HelpMessageHandler
QuitMessageHandler
DataSourceHandler
PersistChangesHandler
QueryHandler
PingMessageHandler
FuncMessageHandler<TMessage>
StopAppHandler
Implements
ILoggable
IMessageHandler<TMessage>
IMessageHandler
System.IDisposable
Inherited Members
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 abstract class MessageHandlerBase<TMessage, TResponse> : Loggable, ILoggable, IMessageHandler<TMessage>, IMessageHandler, IDisposable where TMessage : class where TResponse : class
Type Parameters
Name Description
TMessage

The message type.

TResponse

The response type.

Methods

| Improve this Doc View Source

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()
| Improve this Doc View Source

Dispose(Boolean)

Releases unmanaged and - optionally - managed resources.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

true to release both managed and unmanaged resources; false to release only unmanaged resources.

| Improve this Doc View Source

ProcessAsync(TMessage, IMessagingContext, CancellationToken)

Processes the provided message asynchronously and returns a response promise.

Declaration
public abstract Task<TResponse> 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<TResponse>

The response promise.

Explicit Interface Implementations

| Improve this Doc View Source

IMessageHandler.ProcessAsync(IMessage, IMessagingContext, CancellationToken)

Processes the provided message asynchronously and returns a response promise.

Declaration
Task<IMessage> IMessageHandler.ProcessAsync(IMessage message, IMessagingContext context, CancellationToken token)
Parameters
Type Name Description
IMessage 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.

| Improve this Doc View Source

IMessageHandler<TMessage>.ProcessAsync(TMessage, IMessagingContext, CancellationToken)

Processes the provided message asynchronously and returns a response promise.

Declaration
Task<IMessage> IMessageHandler<TMessage>.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.

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