Class MessageFilterResult<TPayload>
- Namespace
- PatternKit.Messaging.Routing
- Assembly
- PatternKit.Core.dll
Result returned by MessageFilter<TPayload>.
public sealed class MessageFilterResult<TPayload>
Type Parameters
TPayload
- Inheritance
-
MessageFilterResult<TPayload>
- Inherited Members
Properties
Accepted
True when the message should continue downstream.
public bool Accepted { get; }
Property Value
FilterName
The name of the filter that evaluated the message.
public string FilterName { get; }
Property Value
Message
The original message evaluated by the filter.
public Message<TPayload> Message { get; }
Property Value
- Message<TPayload>
RejectionReason
Human-readable rejection reason when the message is rejected.
public string? RejectionReason { get; }
Property Value
RuleName
The name of the allow rule that matched, or null when rejected.
public string? RuleName { get; }
Property Value
Methods
Accept(Message<TPayload>, string, string)
Creates an accepted result.
public static MessageFilterResult<TPayload> Accept(Message<TPayload> message, string filterName, string ruleName)
Parameters
Returns
- MessageFilterResult<TPayload>
Reject(Message<TPayload>, string, string)
Creates a rejected result.
public static MessageFilterResult<TPayload> Reject(Message<TPayload> message, string filterName, string rejectionReason)
Parameters
Returns
- MessageFilterResult<TPayload>