Table of Contents

Method Evaluate

Namespace
RuleWright.Execution
Assembly
RuleWright.Execution.dll

Evaluate<TFact>(LoadedRuleSet, TFact, EvaluationOptions?)

Evaluates a fact against a loaded rule set. Typed facts run compiled delegates (cached per fact type and rule content hash); dictionary facts (IDictionary<string, object>) run the interpreter, reported via CompilationMode.

public RuleEvaluationResult Evaluate<TFact>(LoadedRuleSet ruleSet, TFact fact, EvaluationOptions? options = null)

Parameters

ruleSet LoadedRuleSet

A rule set from LoadRuleSet(string).

fact TFact

The fact instance.

options EvaluationOptions

Per-evaluation options; defaults to Default.

Returns

RuleEvaluationResult

Type Parameters

TFact

The fact type.

Exceptions

ArgumentNullException

ruleSet or fact is null.

RuleCompilationException

A rule cannot be compiled against TFact (missing field path, incompatible value type).

RegexMatchTimeoutException

A MatchesRegex match exceeded the engine's regex timeout.