Table of Contents

Interface IMiddlewareApplicabilityStrategy

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

Strategy for determining whether middleware should be applied to a specific message.

public interface IMiddlewareApplicabilityStrategy
Extension Methods

Methods

DetermineMessageKinds<T>(T)

Determines the message kinds for a given message.

MessageKinds DetermineMessageKinds<T>(T message) where T : IDispatchMessage

Parameters

message T

The message to inspect.

Returns

MessageKinds

The message kinds that apply to this message.

Type Parameters

T

The message type.

ShouldApplyMiddleware(MessageKinds, MessageKinds)

Determines whether middleware with the specified applicable kinds should process a message.

bool ShouldApplyMiddleware(MessageKinds applicableKinds, MessageKinds messageKinds)

Parameters

applicableKinds MessageKinds

The kinds of messages the middleware can process.

messageKinds MessageKinds

The kinds of the current message.

Returns

bool

True if the middleware should process the message; otherwise, false.