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
ruleSetLoadedRuleSetA rule set from LoadRuleSet(string).
factTFactThe fact instance.
optionsEvaluationOptionsPer-evaluation options; defaults to Default.
Returns
Type Parameters
TFactThe fact type.
Exceptions
- ArgumentNullException
ruleSetorfactis null.- RuleCompilationException
A rule cannot be compiled against
TFact(missing field path, incompatible value type).- RegexMatchTimeoutException
A
MatchesRegexmatch exceeded the engine's regex timeout.