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
ruleSetMailRuleSetThe bound rule set, whose declared order is the order the rules are reached in.
factsMailRuleFactsThe fact surface for the email, which resolves each fact at most once for the whole pass.
reachMailRuleReachWhich rules this walk runs: the ones its trigger reaches, or every rule somebody asked for.
cancellationTokenCancellationTokenCancels 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
cancellationTokenis cancelled.