Interface IMailboxExportReader
- Namespace
- MailFathom.Application.Mail.Export
- Assembly
- MailFathom.Application.dll
Reads what an account's stored mail would produce as an export, in two shapes: the totals, and the messages themselves.
public interface IMailboxExportReader
Remarks
Both members take the same scope, so the figures an operator confirmed and the messages the archive is written from are read from one place under one set of rules. Neither reads a payload: the measurement sums recorded lengths, and the walk hands out identities the archive writer then fetches content for one message at a time.
The walk is an asynchronous sequence rather than a page a caller loops over, because the archive is written in one pass whose whole point is that no step of it holds the mailbox. An implementation pages underneath; what this contract promises above is that a message is materialized, written, and let go before the next one is read.
Methods
- MeasureAsync(MailAccountId, string?, CancellationToken)
Sums what the scope holds, per folder and in total.
- ReadFoldersAsync(MailAccountId, string?, CancellationToken)
Names every folder of the scope that holds nothing, so the archive still carries an empty Maildir for it.
- WalkAsync(MailAccountId, string?, CancellationToken)
Walks the stored messages of the scope, folder by folder, in the order the archive writes them.