Table of Contents

Delegate DispatchRequestDelegate

Namespace
Excalibur.Dispatch
Assembly
Excalibur.Dispatch.Abstractions.dll

Represents a delegate that defines the signature for handling dispatch requests in the middleware pipeline.

public delegate ValueTask<IMessageResult> DispatchRequestDelegate(IDispatchMessage message, IMessageContext context, CancellationToken cancellationToken)

Parameters

message IDispatchMessage

The dispatch message to process.

context IMessageContext

The message context containing metadata and state.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

ValueTask<IMessageResult>

A ValueTask<TResult> that represents the asynchronous operation, containing the message processing result. ValueTask can avoid allocating a Task for a synchronously completed result; other dispatch work can still allocate.

Extension Methods