Constructor ConditionLeaf
- Namespace
- RuleWright.Core
- Assembly
- RuleWright.Core.dll
ConditionLeaf(string?, ConditionOperator, object?, string?)
Creates a leaf condition whose left-hand side is a fact field (or a custom function).
public ConditionLeaf(string? field, ConditionOperator @operator, object? value, string? functionName = null)
Parameters
fieldstringDotted path resolved against the fact. Required for every operator except Custom, where it is optional (a custom function without a field receives the whole fact).
operatorConditionOperatorThe comparison operator.
valueobjectThe comparison operand: a CLR scalar (string, bool, long, decimal, double), null, or an object array for In/NotIn.
functionNamestringRegistered function name; required when
operatoris Custom.
Exceptions
- ArgumentException
A custom leaf has no function name, or a non-custom leaf has no field.
ConditionLeaf(ValueExpression, ConditionOperator, object?)
Creates a leaf condition whose left-hand side is a computed value expression.
public ConditionLeaf(ValueExpression left, ConditionOperator @operator, object? value)
Parameters
leftValueExpressionThe expression whose value is compared against
value.operatorConditionOperatorThe comparison operator (not Custom).
valueobjectThe comparison operand (see the field constructor).
Exceptions
- ArgumentNullException
leftis null.- ArgumentException
operatoris Custom.