Class MailRuleConditionCompilation
- Namespace
- MailFathom.Application.Rules.Conditions
- Assembly
- MailFathom.Application.dll
What reading one condition produced: either a condition usable against mail, or every reason it is not.
public sealed class MailRuleConditionCompilation
- Inheritance
-
MailRuleConditionCompilation
- Inherited Members
Remarks
A result type rather than an exception, because the caller is the configuration binder and it acts on the failure: it collects the reasons from every rule of the set and reports them together, so an operator who mistyped three conditions fixes three rather than finding the next one on the next restart.
Properties
- Condition
Gets the compiled condition, which is present exactly when IsCompiled is set.
- Errors
Gets one message per reason the condition cannot be used, each naming the rule, the defect, and where it is.
- IsCompiled
Gets whether the condition can be used against mail.
Methods
- Compiled(IMailRuleCondition)
Reports a condition that parsed, type-checked, and answers with a boolean.
- Refused(IReadOnlyList<string>)
Reports a condition that cannot be used, with every reason found while reading it.