Method ReadUsageSinceAsync
- Namespace
- MailFathom.Application.Mail.Delivery.Governance
- Assembly
- MailFathom.Application.dll
ReadUsageSinceAsync(MailAccountId, DateTimeOffset, CancellationToken)
Reads what has been asked to leave since a period began.
Task<OutgoingMailUsage> ReadUsageSinceAsync(MailAccountId accountId, DateTimeOffset periodStart, CancellationToken cancellationToken)
Parameters
accountIdMailAccountIdThe account whose own counts are wanted beside the deployment's.
periodStartDateTimeOffsetThe instant the period began, as the ceilings place it.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<OutgoingMailUsage>
The messages and recipients recorded in the period, for the account and for every account together.
Remarks
The read is unconditional rather than cached. A period's counts are two indexed reads, a deployment with no ceiling never asks for them at all, and a cached figure would be wrong exactly when it matters — after a restart, or while a second process is sending against the same period.