Table of Contents

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

field string

Dotted 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).

operator ConditionOperator

The comparison operator.

value object

The comparison operand: a CLR scalar (string, bool, long, decimal, double), null, or an object array for In/NotIn.

functionName string

Registered function name; required when operator is 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

left ValueExpression

The expression whose value is compared against value.

operator ConditionOperator

The comparison operator (not Custom).

value object

The comparison operand (see the field constructor).

Exceptions

ArgumentNullException

left is null.

ArgumentException

operator is Custom.