Method CountMessagesAuthoredByAsync
- Namespace
- MailFathom.Application.Contacts.Collection
- Assembly
- MailFathom.Application.dll
CountMessagesAuthoredByAsync(MailAccountId, EmailAddress, int, CancellationToken)
Counts the messages of one account that one address authored.
Task<int> CountMessagesAuthoredByAsync(MailAccountId accountId, EmailAddress author, int ceiling, CancellationToken cancellationToken)
Parameters
accountIdMailAccountIdThe account whose stored mail is counted.
authorEmailAddressThe address to count the messages of.
ceilingintThe count to stop at, because the caller only asks whether a threshold is reached.
cancellationTokenCancellationTokenCancels the read.
Returns
Remarks
One message stored in two folders of one account counts once, because what the threshold is about is how often somebody wrote rather than how many copies of it a mailbox keeps. A message whose sender wrote no identifier for it is counted per stored copy, since nothing else distinguishes two of them.
Exceptions
- ArgumentOutOfRangeException
Thrown when
ceilingis not positive.