Method ReadCurrentPeriodForAccountAsync
- Namespace
- MailFathom.Application.Emails.AttachmentText.Limits
- Assembly
- MailFathom.Application.dll
ReadCurrentPeriodForAccountAsync(AttachmentDerivationStep, MailAccountId, CancellationToken)
Reads where one mailbox stands on one step, across every user it is assigned to.
public Task<AttachmentDerivationAdmission> ReadCurrentPeriodForAccountAsync(AttachmentDerivationStep derivationStep, MailAccountId account, CancellationToken cancellationToken)
Parameters
derivationStepAttachmentDerivationStepThe step about to be taken.
accountMailAccountIdThe mailbox whose mail is about to be read.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<AttachmentDerivationAdmission>
The period, and the strictest standing among the mailbox's users beside the deployment's own.
Remarks
The strictest assigned user decides, because a shared mailbox's mail counts in full against each of them: a reading proceeds only while every one is under their ceiling. A mailbox assigned to nobody is refused by the same rule read the other way: there is no user for the per-user ceiling to admit, so the answer is an exhausted per-user period rather than a fresh one. Admitting it instead would read attachments no caller can reach — every caller-facing scope narrows to the accounts somebody is assigned — under no per-user ceiling at all.
ponytail: one indexed read per assigned user, beside a parse and a provider call that cost orders of magnitude more. A grouped read is worth writing only if a deployment assigns a mailbox widely enough for it to show.
Exceptions
- OperationCanceledException
Thrown when the caller cancels.