Class RuleSet
- Namespace
- RuleWright.Core
- Assembly
- RuleWright.Core.dll
An ordered collection of rules parsed from a single JSON document. Immutable after construction.
public sealed class RuleSet
- Inheritance
-
RuleSet
- Inherited Members
Constructors
- RuleSet(IEnumerable<Rule>, string?, bool)
Creates a rule set.
Properties
- Name
Optional display name.
- Rules
The rules, in document order.
- StopAfterFirstMatch
Whether evaluation stops after the first matching rule regardless of the caller's StopOnFirstMatch — the
firsthit policy of a decision table, carried on the set the table expanded into.
Methods
- Merge(IEnumerable<RuleSet>, string?, bool)
Composes several rule sets into one — RuleWright's equivalent of workflow injection. Rules keep their source order (set by set), and the usual per-set invariants apply to the merged whole: rule ids must be unique across all the sets, so two sets that each define a
vip-discountfail loudly here rather than silently shadowing each other. Composition is a load-time concern by design: rule documents stay self-contained, with no include or reference mechanism to resolve.