Table of Contents

Method ClearOccurrencesAsync

Namespace
MailFathom.Application.Synchronization.Drain
Assembly
MailFathom.Application.dll

ClearOccurrencesAsync(IPersistenceSession, MailAccountId, IReadOnlyCollection<StoredEmailId>, CancellationToken)

Clears the occurrence of every message whose expunge the source has answered.

Task<int> ClearOccurrencesAsync(IPersistenceSession session, MailAccountId account, IReadOnlyCollection<StoredEmailId> drained, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The transaction the clearing commits in.

account MailAccountId

The account the messages belong to.

drained IReadOnlyCollection<StoredEmailId>

The messages the source no longer holds.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<int>

How many rows were cleared.

Remarks

Clearing is also the data-minimization answer: a remote path and a UID that name nothing any more are not kept.