Table of Contents

Method GetEmailsAwaitingContentAsync

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

GetEmailsAwaitingContentAsync(MailAccountId, MailFolderResolutionId, ImapUidValidity, int, CancellationToken)

Gets the occurrences of one folder that are recorded without their content and are waiting for room.

Task<IReadOnlyList<EmailAwaitingContent>> GetEmailsAwaitingContentAsync(MailAccountId accountId, MailFolderResolutionId folderResolutionId, ImapUidValidity uidValidity, int maxEmailCount, CancellationToken cancellationToken)

Parameters

accountId MailAccountId

The account owning the folder.

folderResolutionId MailFolderResolutionId

The alias binding whose occurrences are read.

uidValidity ImapUidValidity

The UID space the caller's open session is selected under.

maxEmailCount int

The greatest number of occurrences to report, oldest UID first.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<IReadOnlyList<EmailAwaitingContent>>

Each waiting occurrence, with what a run completing it has to know about it.

Remarks

Only occurrences of the supplied UID space are reported. A folder the server recreated is a different UID space whose stored occurrences name emails the current one says nothing about, so fetching one by its recorded UID would retrieve a different message.

Whether the occurrence is a copy this deployment filed is reported beside it rather than left to a second query, because the row already carries the join and the read is the same one. A caller that had to ask separately would pay a query per refill for an answer this one already holds.