Table of Contents

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

field string

Dotted path to the collection.

operator ConditionOperator

Any, All, or None.

elementCondition ConditionNode

The 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

ConditionLeaf

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

field is null or empty, or operator is not a quantifier.

ArgumentNullException

elementCondition is null.