Table of Contents

Interface IRuleValueFunction

Namespace
RuleWright.Core
Assembly
RuleWright.Core.dll

A custom value-returning function referenced from a value expression as { "call": "...", "operands": [...] }. Where an IRuleFunction answers a condition (true/false), a value function computes a value usable anywhere an expression is: an action's value, the left-hand side of a condition, or a decision-table cell. Implementations are registered with the engine builder and bound into compiled rules at compile time — no name lookup or reflection happens per evaluation.

public interface IRuleValueFunction

Remarks

Implementations must be thread-safe (one instance serves all concurrent evaluations) and should be total, like the built-in expression operators: return null for an argument shape they don't understand rather than throwing.

Properties

Name

The name the function is referenced by in rule JSON. Case-sensitive.

Methods

Invoke(object?[])

Computes the function's value.