Table of Contents

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

isEnabled bool

Whether classification runs.

usesScanner bool

Whether a configured scanner is consulted.

scannedFolderAliases IEnumerable<MailFolderAlias>

The folder aliases to classify, already resolved to the inbox where the operator named none.

scannerThreshold double?

The threshold to judge a scanner's score by, or null to keep the scanner's own.

maximumClassificationWait TimeSpan?

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 scannedFolderAliases is null.

ArgumentOutOfRangeException

Thrown when scannerThreshold is not a finite number, or the wait is not positive.