Struct SpamClassificationProfile
- Namespace
- MailFathom.Domain.Spam
- Assembly
- MailFathom.Domain.dll
Identifies the terms a verdict was reached under, as a digest of the operator's own classification settings.
public readonly record struct SpamClassificationProfile : IEquatable<SpamClassificationProfile>
- Implements
- Inherited Members
Remarks
Derived rather than declared, for the reason a rule set's revision is: an authored version key can be forgotten, and an edit that moves a threshold while leaving the key alone is exactly the case a record has to be able to tell apart. It is what makes "this message was already decided under the terms in force now" a question somebody can ask of an existing record, which is what a run over a whole mailbox skips mail on.
The digest covers only what changes a verdict: whether a scanner is consulted, and the threshold its score is judged by. The scanned folder scope is deliberately outside it — adding a folder changes which mail is classified and not what any classification would have concluded, so including it would force a rescan of mail nothing about the decision has moved for. The scanner's own rule corpus is outside it too, because a classification records that separately and under the name the scanner gives it.
It carries nothing derived from a message, so a record naming a profile and a log line reporting one hold nothing personal.
Fields
- LengthInCharacters
How many hexadecimal characters of the digest the identity keeps.
Properties
- IsSpecified
Gets whether this value names a profile rather than the unusable struct default.
- Value
Gets the identity, as lowercase hexadecimal.
Methods
- Create(bool, double?)
Derives the identity of the settings a classification is reached under.
- Restore(string)
Reads back a profile this system derived earlier and recorded.
- ToString()
Returns the fully qualified type name of this instance.