Interface IMailRuleCondition
- Namespace
- MailFathom.Application.Rules.Conditions
- Assembly
- MailFathom.Application.dll
A condition that has been parsed, checked against the fact surface, and proven to answer with a boolean.
public interface IMailRuleCondition
Remarks
The whole of what the rest of the system knows about the condition language. A compiled condition carries no expression, no parser state, and no authored text — the text is the operator's configuration and stays there, which is what keeps an address somebody typed into a condition out of every record that names the rule.
An implementation may throw. Totality is a classification the evaluator applies rather than a property of the evaluator underneath, so a condition that cannot be evaluated for the email in front of it raises the failure and MailRuleSetEvaluator turns it into a failed rule with a reason. What an implementation must never do is answer false because something went wrong.
Properties
- ReferencedFacts
Gets the facts the condition names, which is every fact it can cause to be resolved and no other.
Methods
- EvaluateAsync(MailRuleFacts, CancellationToken)
Evaluates the condition for one email.