Table of Contents

Interface IEndpointRuleChainBuilder<TMessage>

Namespace
Excalibur.Dispatch.Routing.Builder
Assembly
Excalibur.Dispatch.dll

Builder for chaining additional conditional endpoint rules.

public interface IEndpointRuleChainBuilder<TMessage> where TMessage : IDispatchMessage

Type Parameters

TMessage

The message type being routed.

Extension Methods

Methods

GetRules()

Gets all configured endpoint rules.

IReadOnlyList<EndpointRoutingRule> GetRules()

Returns

IReadOnlyList<EndpointRoutingRule>

A read-only collection of endpoint routing rules.

Route<TOther>()

Begins defining a new endpoint routing rule for another message type.

IEndpointRuleBuilder<TOther> Route<TOther>() where TOther : IDispatchMessage

Returns

IEndpointRuleBuilder<TOther>

A rule builder for the new message type.

Type Parameters

TOther

The other message type to route.

When(Func<TMessage, IMessageContext, bool>)

Adds a conditional routing rule using the message context.

IConditionalEndpointBuilder<TMessage> When(Func<TMessage, IMessageContext, bool> predicate)

Parameters

predicate Func<TMessage, IMessageContext, bool>

The condition to evaluate against message and context.

Returns

IConditionalEndpointBuilder<TMessage>

A builder for specifying additional endpoints when the condition is met.

Exceptions

ArgumentNullException

Thrown when predicate is null.

When(Func<TMessage, bool>)

Adds a conditional routing rule based on message content.

IConditionalEndpointBuilder<TMessage> When(Func<TMessage, bool> predicate)

Parameters

predicate Func<TMessage, bool>

The condition to evaluate.

Returns

IConditionalEndpointBuilder<TMessage>

A builder for specifying additional endpoints when the condition is met.

Exceptions

ArgumentNullException

Thrown when predicate is null.