Table of Contents

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

bool

FilterName

The name of the filter that evaluated the message.

public string FilterName { get; }

Property Value

string

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

string

RuleName

The name of the allow rule that matched, or null when rejected.

public string? RuleName { get; }

Property Value

string

Methods

Accept(Message<TPayload>, string, string)

Creates an accepted result.

public static MessageFilterResult<TPayload> Accept(Message<TPayload> message, string filterName, string ruleName)

Parameters

message Message<TPayload>
filterName string
ruleName string

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

message Message<TPayload>
filterName string
rejectionReason string

Returns

MessageFilterResult<TPayload>