Class ConditionLeaf
- Namespace
- RuleWright.Core
- Assembly
- RuleWright.Core.dll
A leaf condition comparing a left-hand side against a constant value, or delegating to a
registered custom function. The left-hand side is usually a fact field (a dotted path such
as Customer.Age), but can also be a computed Left value expression
(such as Order.Total * 0.9).
public sealed class ConditionLeaf : ConditionNode
- Inheritance
-
ConditionLeaf
- Inherited Members
Constructors
- ConditionLeaf(ValueExpression, ConditionOperator, object?)
Creates a leaf condition whose left-hand side is a computed value expression.
- ConditionLeaf(string?, ConditionOperator, object?, string?)
Creates a leaf condition whose left-hand side is a fact field (or a custom function).
Fields
- ElementSelfPath
The path meaning "the element currently being tested" inside a quantifier's condition.
Properties
- ElementCondition
The per-element condition when Operator is a quantifier (Any/All/None), otherwise null. In JSON this is the leaf's
conditionkey. Field paths inside it resolve against the element, with ElementSelfPath naming the element itself.
- FunctionName
The registered custom function name when Operator is Custom.
- Left
The computed left-hand side, or null when the left-hand side is the Field path (or the whole fact for a field-less custom condition).
- Operator
The comparison operator.
- Value
The constant comparison operand (null for IsNull/IsNotNull and field-only custom calls).
Methods
- IsQuantifier(ConditionOperator)
Whether an operator quantifies over the elements of a collection.
- Quantifier(string, ConditionOperator, ConditionNode)
Creates a collection quantifier:
fieldnames a collection andelementConditionis evaluated once per element.