Interface IExpression

Assembly: redb.Route.dll

Represents an expression that can be evaluated against an exchange context.
Expressions extract or compute values from a message exchange.
Used for content-based routing, transformations, and predicate construction.

public interface IExpression

Methods

and(IPredicate)

Creates a logical AND predicate combining this expression with another predicate.

IPredicate and(IPredicate predicate)

contains(object)

Creates a "contains" predicate (for strings and collections).

IPredicate contains(object value)

endsWith(object)

Creates an "ends with" predicate (for strings).

IPredicate endsWith(object value)

Evaluate<T>(IExchange)

Evaluates the expression and returns the result cast to T.

T Evaluate<T>(IExchange exchange)

In(params object[])

Creates an "in set" predicate.

IPredicate In(params object[] values)

isBetween(object, object)

Creates a "between" predicate (inclusive).

IPredicate isBetween(object low, object high)

isEqualTo(object)

Creates a predicate that checks equality of this expression's result with the given value.

IPredicate isEqualTo(object value)

isGreaterThan(object)

Creates a "greater than" predicate.

IPredicate isGreaterThan(object value)

isGreaterThanOrEqualTo(object)

Creates a "greater than or equal" predicate.

IPredicate isGreaterThanOrEqualTo(object value)

isLessThan(object)

Creates a "less than" predicate.

IPredicate isLessThan(object value)

isLessThanOrEqualTo(object)

Creates a "less than or equal" predicate.

IPredicate isLessThanOrEqualTo(object value)

isNotEqualTo(object)

Creates a "not equal" predicate.

IPredicate isNotEqualTo(object value)

isNotNull()

Creates an "is not null" predicate.

IPredicate isNotNull()

isNull()

Creates an "is null" predicate.

IPredicate isNull()

not()

Creates a logical NOT predicate negating this expression.

IPredicate not()

or(IPredicate)

Creates a logical OR predicate combining this expression with another predicate.

IPredicate or(IPredicate predicate)

regex(string)

Creates a regex-match predicate.

IPredicate regex(string pattern)

SetValue(IExchange, object)

Sets a value in the exchange according to this expression's semantics.

void SetValue(IExchange exchange, object value)

startsWith(object)

Creates a "starts with" predicate (for strings).

IPredicate startsWith(object value)

ToTemplateString()

Serializes this expression to a ${...} template string suitable for URI parameters.

string ToTemplateString()