Method ReadTermsAsync
- Namespace
- MailFathom.Application.Spam.Gating
- Assembly
- MailFathom.Application.dll
ReadTermsAsync(CancellationToken)
Reads the terms in force now, as one snapshot a whole walk is decided under.
public Task<DerivedWorkAdmissionTerms> ReadTermsAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<DerivedWorkAdmissionTerms>
The terms, which admit everything belonging to a user who classifies nothing.
Remarks
The junk folders are narrowed to the accounts of users who classify, which is what keeps the withholding an ordering behind classification rather than a rule of its own: a user who switched classification off has mail in their junk folder derived from like any other, exactly as every user did before the gate existed.
Every part of it is read from the account records, so a caller reads it once for its work rather than once per message: a walk reads it per batch, and a run that meets messages one at a time reads it once for the run and decides each of them with Admit(DerivedWorkAdmissionTerms, DerivedWorkCandidate).