Table of Contents

Class MailRuleScheduleSource

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

Reads the recurring dispatches the declared rules ask for, one per scheduled rule and account it reaches.

public sealed class MailRuleScheduleSource : IScheduledJobSource
Inheritance
MailRuleScheduleSource
Implements
Inherited Members

Remarks

A schedule per rule and account rather than per rule, because a rule reaching three mailboxes is three walks and each has to be able to be under way, missed, or caught up on independently of the other two. The identity is composed of both for that reason, and out of nothing else: it is a key an operator reads, so it is made of the names they wrote.

What a scheduled walk then evaluates is every rule declaring the schedule trigger for that account, not only the rule whose occasion started it. That is one walk of a mailbox per occasion instead of one per rule, which is the whole of the saving: a mailbox is read once and every rule that opted into schedules is applied to what was read. A rule declaring the shorter interval therefore brings the others round with it, which is a deliberate trade and is what Triggers already means everywhere else — the trigger decides which rules a walk reaches, and the schedule decides when a walk starts.

Read from the rule set in force rather than held, so an edit that adds, moves, or removes a schedule reaches the next pass. A schedule an edit removed simply stops being declared; the row recording what it last did stays behind, which is what makes putting the rule back a resumption rather than a fresh start.

Constructors

MailRuleScheduleSource(IMailRuleSetSource, IMailAccountCatalog)

Initializes the source over the rules in force and the accounts they may reach.

Methods

ReadSchedules()

Reads the schedules this source declares as they stand now.