Constructor RuleSet
- Namespace
- RuleWright.Core
- Assembly
- RuleWright.Core.dll
RuleSet(IEnumerable<Rule>, string?, bool)
Creates a rule set.
public RuleSet(IEnumerable<Rule> rules, string? name = null, bool stopAfterFirstMatch = false)
Parameters
rulesIEnumerable<Rule>The rules, in document order.
namestringOptional display name.
stopAfterFirstMatchboolWhen true, evaluation stops after the first rule whose condition passes, exactly as StopOnFirstMatch does. This is the set's own semantics rather than the caller's — a
first-hit-policy decision table sets it — and the two combine with OR, so a caller can still stop acollectset early but cannot turn afirsttable into a collecting one.
Exceptions
- ArgumentNullException
rulesis null or contains null.- ArgumentException
rulesis empty or contains duplicate rule ids.