Table of Contents

Class FlaggedDeleteFollower

Namespace
MailFathom.Application.Synchronization.Reconciliation
Assembly
MailFathom.Application.dll

Follows the occurrences a delete MailFathom authored only flagged \Deleted, for one folder.

public sealed class FlaggedDeleteFollower
Inheritance
FlaggedDeleteFollower
Inherited Members

Remarks

Such a delete never makes its occurrence disappear, so the backward pass, which reads a delete as complete when the occurrence is gone, would never settle it. This pass does instead. The first reading that still sees the flag applies the local disposition the delete was authored under and starts following the occurrence; every later reading asks whether the server still holds it flagged, expunged it, or has had the flag removed — which undoes the delete, so the message comes back as live mail, stored again where its local copy had been erased.

It runs before the backward pass of the same folder, so a row it disposes of is already out of that pass's window. A delete whose occurrence is gone before any reading saw the flag is left to the backward pass, which attributes the disappearance to the delete and applies its disposition exactly as it does for a delete that expunged.

Everything it asks the server is read-only: flags, for occurrences the folder was already asked about, and nothing that could set \Seen. Both reads are bounded per run by the same limit as the backward window.

Constructors

FlaggedDeleteFollower(IStoredEmailReconciliationStore, IMailboxMutationReconciliationStore, OptimisticConcurrencyRetryPolicy, ClientSignals, TimeProvider, MailboxSynchronizationOptions)

Initializes a new instance of the FlaggedDeleteFollower class.

Methods

FollowAsync(IMailboxSession, MailAccountId, MailFolderResolution, ImapUidValidity, CancellationToken)

Settles and follows one bounded batch of the folder's flag-only deletes.

RetireAsync(MailAccountId, MailFolderAlias, DeleteLeftFlagged, StoredEmailId?, CancellationToken)

Stops following an occurrence whose erased message the run has stored again, or found it could not.