Method Quantifier
- Namespace
- RuleWright.Core
- Assembly
- RuleWright.Core.dll
Quantifier(string, ConditionOperator, ConditionNode)
Creates a collection quantifier: field names a collection and
elementCondition is evaluated once per element.
public static ConditionLeaf Quantifier(string field, ConditionOperator @operator, ConditionNode elementCondition)
Parameters
fieldstringDotted path to the collection.
operatorConditionOperatorelementConditionConditionNodeThe condition applied to each element. Its field paths resolve against the element, and the path
"$"means the element itself — which is how a collection of scalars is tested.
Returns
Remarks
A factory rather than a constructor overload: a third (string, ConditionOperator, …)
constructor would capture new ConditionLeaf(field, op, null), which today means a
null value, and silently change what existing code compiles to.
Exceptions
- ArgumentException
fieldis null or empty, oroperatoris not a quantifier.- ArgumentNullException
elementConditionis null.