Table of Contents

Interface IMediator

Namespace
Opossum.Mediator
Assembly
Opossum.dll

Entry point for processing messages with the mediator pattern

public interface IMediator

Methods

InvokeAsync<T>(object, CancellationToken, TimeSpan?)

Execute the message handling for this message synchronously and wait for the response. The message is handled locally and delegates immediately to the appropriate handler.

Task<T> InvokeAsync<T>(object message, CancellationToken cancellation = default, TimeSpan? timeout = null)

Parameters

message object

The message/request to process

cancellation CancellationToken

Cancellation token for async operations

timeout TimeSpan?

Optional timeout for the operation

Returns

Task<T>

The response of type T from the handler

Type Parameters

T

The expected response type