Interface IEndpointRuleChainBuilder<TMessage>
Builder for chaining additional conditional endpoint rules.
public interface IEndpointRuleChainBuilder<TMessage> where TMessage : IDispatchMessage
Type Parameters
TMessageThe 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
TOtherThe 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
predicateFunc<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
predicateis null.
When(Func<TMessage, bool>)
Adds a conditional routing rule based on message content.
IConditionalEndpointBuilder<TMessage> When(Func<TMessage, bool> predicate)
Parameters
Returns
- IConditionalEndpointBuilder<TMessage>
A builder for specifying additional endpoints when the condition is met.
Exceptions
- ArgumentNullException
Thrown when
predicateis null.