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
accountIdMailAccountIdThe account whose sends are read.
limitintThe greatest number of records to return.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<IReadOnlyList<OutgoingEmailRecord>>
The outstanding records, oldest first, at most
limitof 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
limitis not positive.