Method Create
- Namespace
- MailFathom.Application.Spam
- Assembly
- MailFathom.Application.dll
Create(bool, bool, IEnumerable<MailFolderAlias>, double?, TimeSpan?)
Builds the settings an operator's answers describe.
public static SpamClassificationSettings Create(bool isEnabled, bool usesScanner, IEnumerable<MailFolderAlias> scannedFolderAliases, double? scannerThreshold = null, TimeSpan? maximumClassificationWait = null)
Parameters
isEnabledboolWhether classification runs.
usesScannerboolWhether a configured scanner is consulted.
scannedFolderAliasesIEnumerable<MailFolderAlias>The folder aliases to classify, already resolved to the inbox where the operator named none.
scannerThresholddouble?The threshold to judge a scanner's score by, or null to keep the scanner's own.
maximumClassificationWaitTimeSpan?How long a message waits on a verdict before derived work runs unclassified, or null for the default.
Returns
- SpamClassificationSettings
The settings, with the alias list deduplicated and ordered.
Exceptions
- ArgumentNullException
Thrown when
scannedFolderAliasesis null.- ArgumentOutOfRangeException
Thrown when
scannerThresholdis not a finite number, or the wait is not positive.