Table of Contents

Method ReadOutstandingAsync

Namespace
MailFathom.Application.Mail.Delivery
Assembly
MailFathom.Application.dll

ReadOutstandingAsync(MailAccountId, int, CancellationToken)

Reads the sends of one account that have not reached a terminal stage.

Task<IReadOnlyList<OutgoingEmailRecord>> ReadOutstandingAsync(MailAccountId accountId, int limit, CancellationToken cancellationToken)

Parameters

accountId MailAccountId

The account whose sends are read.

limit int

The greatest number of records to return.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<IReadOnlyList<OutgoingEmailRecord>>

The outstanding records, oldest first, at most limit of them.

Remarks

This is what a restart reads, and the one answer it must not lose is a record left at TransmissionBegun: that message may or may not have been delivered, and a process that never looked at it again would leave the question permanently unasked.

Oldest first, because the answer starts with whatever has been queued longest. It is bounded like every other public query, and a caller treats the bound as a page it comes back for rather than as a cut.

Exceptions

ArgumentOutOfRangeException

Thrown when limit is not positive.