Table of Contents

Interface IStoredThreadStateStore

Namespace
MailFathom.Application.Emails.ThreadStates
Assembly
MailFathom.Application.dll

Reads the conversations whose state is missing or out of date, and writes down what one derivation produced.

public interface IStoredThreadStateStore

Remarks

The selection is the whole contract. A conversation leaves it by having a state recorded against the shape it currently has, 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. A conversation that gains a reply re-enters it, which is how a state is kept current without anything watching for a change.

What puts a conversation 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.

Methods

GetThreadsAwaitingStateAsync(MailAccountId, int, int, int, CancellationToken)

Reads one bounded batch of the account's conversations whose state is missing or out of date.

SaveAsync(IPersistenceSession, EmailThreadState, CancellationToken)

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