Table of Contents

Interface IStoredEmailEnrichmentStore

Namespace
MailFathom.Application.Emails.Enrichment
Assembly
MailFathom.Application.dll

Reads the mail the arrival pipeline still owes a derivation, and writes down what one produced.

public interface IStoredEmailEnrichmentStore

Remarks

The selection is the whole contract, exactly as it is for the cut. A message leaves it by being enriched, so a pass needs no cursor of its own, an interrupted pass repeats nothing and skips nothing, and what one pass's bound leaves behind is the next run's. That is also what makes backfilling an existing mailbox resumable without a second mechanism: a mailbox enriched for the first time drains over successive runs, a bound at a time.

What puts a message into the selection is stated by the implementation rather than by the caller, so the conditions the pipeline already decided — the classification gate, the rules having finished, a message not still on its way out of a folder — are one predicate the pass cannot get out of order. The one condition this selection adds is that the message has passages, because a mark cites passages and a message with none has nothing to rest on.

Methods

GetEmailsAwaitingEnrichmentAsync(MailAccountId, int, int, CancellationToken)

Reads one bounded batch of the account's mail that is ready to be derived from and has not been.

SaveAsync(IPersistenceSession, EmailEnrichment, CancellationToken)

Stages what one derivation settled about one message, inside the caller's session.