Class TypedXPathExpression<TValue>
An XPath expression that remembers the target CLR type TValue.
When the pipeline calls Evaluate<object>(exchange), the stored type is used
for the internal call, ensuring proper
type conversion (e.g., xpath<bool>("//active") returns a boxed
instead of a raw string).
public sealed class TypedXPathExpression<TValue> : Expression, IExpression
Inheritance
Implements
Inherited Members
Methods
Evaluate<T>(IExchange)
Evaluates the expression and returns the result cast to T.
public override T Evaluate<T>(IExchange exchange)
From(IExpression)
Returns the same expression reading source instead of the message body.
public TypedXPathExpression<TValue> From(IExpression source)
SetValue(IExchange, object)
Sets a value in the exchange according to this expression's semantics.
public override void SetValue(IExchange exchange, object value)
Trimmed(bool)
Returns the same expression with whitespace trimmed off the text it extracts.
public TypedXPathExpression<TValue> Trimmed(bool trim = true)
WithNamespaces(params (string Prefix, string Uri)[])
Returns the same expression with prefixes bound to namespace URIs, so a path can address a
public TypedXPathExpression<TValue> WithNamespaces(params (string Prefix, string Uri)[] namespaces)
WithParameters(params (string Name, IExpression Value)[])
Returns the same expression with named XPath variables bound to expressions, so a value from
public TypedXPathExpression<TValue> WithParameters(params (string Name, IExpression Value)[] parameters)
Constructors
TypedXPathExpression(string, XPathResult, IExpression?)
Initializes a new instance of the class.