Class DiscoveryCoverageReader
- Namespace
- MailFathom.Application.Discovery.Runs
- Assembly
- MailFathom.Application.dll
Reads what one run drew on: which accounts its scope reached, how far the mail it found reached, and how current each account's local copy was.
public sealed class DiscoveryCoverageReader
- Inheritance
-
DiscoveryCoverageReader
- Inherited Members
Remarks
A Discover answer is composed from a synchronized copy, so how current that copy was is part of the answer. This reduces the same two sources MailAccountFreshnessReader does — what synchronization durably committed, and how this process's most recent runs ended — to one reading per account, in the shape a plan carries.
The accounts are the scope's rather than the passages', which is deliberate. A question asked over two mailboxes read both, and reporting only the one that happened to answer would hide exactly the account whose staleness might be why it did not — so an account that yielded nothing is reported with its freshness and with no dates.
It reaches no mail server and returns no mail: an account's generated identifier, one instant, and the two ends of what the run drew on are the whole of what a caller receives. It applies no permission of its own, because it is composed inside a run that has already required its grant and is bounded by that run's own scope.
Constructors
- DiscoveryCoverageReader(ISynchronizationFreshnessReader, MailSynchronizationRunLedger)
Creates the reading a run reports its own reach through.
Methods
- ReadAsync(MailboxScope, IReadOnlyList<EmailKnowledgePassage>, CancellationToken)
Reads one coverage entry per account the run's scope reached.