Table of Contents

Class MailRuleSet

Namespace
MailFathom.Application.Rules
Assembly
MailFathom.Application.dll

The rules one configuration revision declares, in the order it declares them, under one identity.

public sealed class MailRuleSet
Inheritance
MailRuleSet
Inherited Members

Remarks

The order is the contract. Two rules matching one email must produce the same outcome on every run and on every instance, so which of them is reached first is a property of the declared set rather than of anything observed while it runs, and nothing here sorts, groups, or reorders what it was given.

Immutable, because a pass reads the set once when it starts and uses that instance for its duration. A rule set edited while a pass is running finishes against the revision the pass began with, and the next pass reads the new one.

The bounds travel with the set for that same reason. They are declared in the same section as the rules, so a pass that has taken a set has taken the limits that set was read under; two of the three were already spent proving the conditions usable, and the third bounds every evaluation the pass is about to make.

Properties

Bounds

Gets the bounds the rules were read under and are evaluated under.

IsEmpty

Gets whether the set declares any rule at all.

Revision

Gets the identity of this revision of the rule set.

Rules

Gets the rules in the order they were declared.

Methods

Create(IReadOnlyList<MailRule>, MailRuleSetRevision, MailRuleConditionBounds)

Creates a rule set from rules that have already been proven usable.