Table of Contents

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

account MailAccountId

The account the run was over.

newMessageCount int

How many messages the run committed locally.

cancellationToken CancellationToken

Cancels the raise.

Returns

Task<bool>

true when a notification was kept.

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 newMessageCount is negative.