Table of Contents

Class ReflectionMessageHandler

Namespace
Opossum.Mediator
Assembly
Opossum.dll

Reflection-based message handler implementation

public sealed class ReflectionMessageHandler : IMessageHandler
Inheritance
ReflectionMessageHandler
Implements
Inherited Members

Constructors

ReflectionMessageHandler(Type, MethodInfo)

public ReflectionMessageHandler(Type handlerType, MethodInfo method)

Parameters

handlerType Type
method MethodInfo

Properties

MessageType

The type of message this handler processes

public Type MessageType { get; }

Property Value

Type

Methods

HandleAsync(object, IServiceProvider, CancellationToken)

Execute the handler logic

public Task<object?> HandleAsync(object message, IServiceProvider serviceProvider, CancellationToken cancellation)

Parameters

message object

The message to handle

serviceProvider IServiceProvider

Service provider for dependency injection

cancellation CancellationToken

Cancellation token

Returns

Task<object>

The response object, or null if no response