Interface IMiddlewareApplicabilityStrategy
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
messageTThe message to inspect.
Returns
- MessageKinds
The message kinds that apply to this message.
Type Parameters
TThe message type.
ShouldApplyMiddleware(MessageKinds, MessageKinds)
Determines whether middleware with the specified applicable kinds should process a message.
bool ShouldApplyMiddleware(MessageKinds applicableKinds, MessageKinds messageKinds)
Parameters
applicableKindsMessageKindsThe kinds of messages the middleware can process.
messageKindsMessageKindsThe kinds of the current message.
Returns
- bool
True if the middleware should process the message; otherwise, false.