Class Expression
Abstract base class for expressions that implements the interface.
Provides a standard set of predicate factory methods for building routing conditions.
public abstract class Expression : IExpression
Inheritance
Implements
Derived
Methods
and(IPredicate)
Creates a predicate that combines the current condition with another using logical AND.
public IPredicate and(IPredicate predicate)
contains(object)
Creates a predicate that checks whether the expression value contains the specified value (for strings/collections).
public IPredicate contains(object value)
endsWith(object)
Creates a predicate that checks whether the expression value ends with the specified value.
public IPredicate endsWith(object value)
Evaluate<T>(IExchange)
Evaluates the expression and returns the result cast to T.
public abstract T Evaluate<T>(IExchange exchange)
In(params object[])
Creates a predicate that checks whether the expression value is contained in the specified set of values.
public IPredicate In(params object[] values)
isBetween(object, object)
Creates a predicate that checks whether the expression value falls between two boundaries (inclusive).
public IPredicate isBetween(object low, object high)
isEqualTo(object)
Creates a predicate that checks whether the expression value equals the specified value.
public IPredicate isEqualTo(object value)
isGreaterThan(object)
Creates a predicate that checks whether the expression value is greater than the specified value.
public IPredicate isGreaterThan(object value)
isGreaterThanOrEqualTo(object)
Creates a predicate that checks whether the expression value is greater than or equal to the specified value.
public IPredicate isGreaterThanOrEqualTo(object value)
isLessThan(object)
Creates a predicate that checks whether the expression value is less than the specified value.
public IPredicate isLessThan(object value)
isLessThanOrEqualTo(object)
Creates a predicate that checks whether the expression value is less than or equal to the specified value.
public IPredicate isLessThanOrEqualTo(object value)
isNotEqualTo(object)
Creates a predicate that checks whether the expression value does not equal the specified value.
public IPredicate isNotEqualTo(object value)
isNotNull()
Creates a predicate that checks whether the expression value is not null.
public IPredicate isNotNull()
isNull()
Creates a predicate that checks whether the expression value is null.
public IPredicate isNull()
or(IPredicate)
Creates a predicate that combines the current condition with another using logical OR.
public IPredicate or(IPredicate predicate)
regex(string)
Creates a predicate that checks whether the expression value matches the specified regular expression pattern.
public IPredicate regex(string pattern)
SetValue(IExchange, object)
Sets a value in the exchange according to this expression's semantics.
public abstract void SetValue(IExchange exchange, object value)
startsWith(object)
Creates a predicate that checks whether the expression value starts with the specified value.
public IPredicate startsWith(object value)
ToTemplateString()
Serializes this expression to a ${...} template string suitable for URI parameters.
public virtual string ToTemplateString()