Table of Contents

Method EvaluateAsync

Namespace
MailFathom.Application.Rules
Assembly
MailFathom.Application.dll

EvaluateAsync(MailRuleSet, MailRuleFacts, MailRuleReach, CancellationToken)

Evaluates every rule of the set against one email until a matching rule ends the pass.

public Task<MailRuleSetEvaluation> EvaluateAsync(MailRuleSet ruleSet, MailRuleFacts facts, MailRuleReach reach, CancellationToken cancellationToken)

Parameters

ruleSet MailRuleSet

The bound rule set, whose declared order is the order the rules are reached in.

facts MailRuleFacts

The fact surface for the email, which resolves each fact at most once for the whole pass.

reach MailRuleReach

Which rules this walk runs: the ones its trigger reaches, or every rule somebody asked for.

cancellationToken CancellationToken

Cancels the pass, which is reported as cancellation rather than as a failed rule.

Returns

Task<MailRuleSetEvaluation>

What each rule the pass reached concluded, under the rule set's revision.

Exceptions

ArgumentNullException

Thrown when an argument is null.

OperationCanceledException

Thrown when cancellationToken is cancelled.