Table of Contents

Interface IMessageHandler

Namespace
Opossum.Mediator
Assembly
Opossum.dll

Interface for generated/compiled message handlers

public interface IMessageHandler

Properties

MessageType

The type of message this handler processes

Type MessageType { get; }

Property Value

Type

Methods

HandleAsync(object, IServiceProvider, CancellationToken)

Execute the handler logic

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