Constructor DerivedWorkAdmissionTerms
- Namespace
- MailFathom.Application.Spam.Gating
- Assembly
- MailFathom.Application.dll
DerivedWorkAdmissionTerms(IReadOnlyList<MailAccountId>, IReadOnlyList<MailFolderIdentity>, IReadOnlyList<MailFolderIdentity>, DateTimeOffset)
The terms one moment's admissions are decided under, as a value a query can be narrowed by.
public DerivedWorkAdmissionTerms(IReadOnlyList<MailAccountId> ClassifyingAccounts, IReadOnlyList<MailFolderIdentity> JunkFolders, IReadOnlyList<MailFolderIdentity> ClassifiedFolders, DateTimeOffset ReleasedWhenStoredBefore)
Parameters
ClassifyingAccountsIReadOnlyList<MailAccountId>The accounts whose user has classification switched on. Empty for a deployment nobody classifies for, which is what makes such a deployment behave exactly as it did before the gate existed.
JunkFoldersIReadOnlyList<MailFolderIdentity>The junk folder of each classifying account, whose mail is withheld with nothing having to score it. An account whose user classifies nothing contributes none, so its junk folder is ordinary mail here.
ClassifiedFoldersIReadOnlyList<MailFolderIdentity>The folders classification runs over, each within its own account. Mail outside them is admitted rather than left waiting, because nothing is ever going to reach a verdict about it.
ReleasedWhenStoredBeforeDateTimeOffsetThe instant a message must have been stored before to be released without a verdict. It is the moment the terms were read, less the wait a verdict is allowed.
Remarks
It is the whole decision as a value, because a walk over stored mail narrows a table and needs it as something it can put into a predicate, while the arrival path holds one occurrence and asks Admit(DerivedWorkAdmissionTerms, DerivedWorkCandidate) about that one. Both read the same terms, built from one reading of the settings and one reading of the clock, so the two cannot disagree about what a moment admits.
It is a snapshot rather than a live view, so one decision is never made against a settings reload half way through itself. Which moment a walk's batches are decided at is the walk's own business: the wait only ever moves forward, so a batch read later releases what an earlier one held and never the reverse.
Everything here is named by account, which is how one user's decision reaches a walk that spans users: an account
belongs to exactly one user, so an account absent from ClassifyingAccounts is one whose user
classifies nothing and whose mail is admitted with no verdict expected about it.