Table of Contents

Constructor DerivedWorkAdmissionTerms

Namespace
MailFathom.Application.Spam.Gating
Assembly
MailFathom.Application.dll

DerivedWorkAdmissionTerms(bool, IReadOnlyList<MailFolderIdentity>, IReadOnlyList<MailFolderAlias>, DateTimeOffset)

The terms one moment's admissions are decided under, as a value a query can be narrowed by.

public DerivedWorkAdmissionTerms(bool IsApplied, IReadOnlyList<MailFolderIdentity> JunkFolders, IReadOnlyList<MailFolderAlias> ClassifiedFolderAliases, DateTimeOffset ReleasedWhenStoredBefore)

Parameters

IsApplied bool

Whether the gate reaches anything at all. False with classification switched off, which is what makes a deployment that classifies nothing behave exactly as it did before the gate existed.

JunkFolders IReadOnlyList<MailFolderIdentity>

Every account's junk folder, whose mail is withheld with nothing having to score it.

ClassifiedFolderAliases IReadOnlyList<MailFolderAlias>

The folder aliases classification runs over. Mail outside them is admitted rather than left waiting, because nothing is ever going to reach a verdict about it.

ReleasedWhenStoredBefore DateTimeOffset

The 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

The reason this exists beside Admit(DerivedWorkCandidate) is the reason IMailFolderParticipationReader answers in two shapes: a walk over stored mail narrows a table and needs the whole decision as a value it can put into a predicate, while the arrival path holds one occurrence and asks about that one. Both are built here, 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.