Method ReportArrivedMailAsync
- Namespace
- MailFathom.Application.Notifications
- Assembly
- MailFathom.Application.dll
ReportArrivedMailAsync(MailAccountId, int, CancellationToken)
Reports the mail one run committed, as one notification for the run.
public Task<bool> ReportArrivedMailAsync(MailAccountId account, int newMessageCount, CancellationToken cancellationToken)
Parameters
accountMailAccountIdThe account the run was over.
newMessageCountintHow many messages the run committed locally.
cancellationTokenCancellationTokenCancels the raise.
Returns
Remarks
A run that committed nothing says nothing: an empty run is the ordinary case and is not an event anybody was away from the screen for. Arrival is deduplicated like every other condition, so a standing unread arrival keeps the count of the run that raised it and a later run's mail adds no second row: what the row says is that mail arrived rather than how much is waiting, and the mailbox answers the second question when it is opened.
Exceptions
- ArgumentOutOfRangeException
Thrown when
newMessageCountis negative.