Interface IMailRuleConditionCompiler
- Namespace
- MailFathom.Application.Rules.Conditions
- Assembly
- MailFathom.Application.dll
Reads one authored condition and either compiles it or reports everything wrong with it.
public interface IMailRuleConditionCompiler
Remarks
The port exists so that the expression language stays inside one adapter. Everything above this line knows that a condition is text an operator wrote and that reading it either succeeds or produces messages; nothing above it knows which language the text is in, and no type from that language crosses the boundary.
Compilation runs when a rule set is bound, which is before any mail has been seen — at startup, and again for every candidate a configuration reload produces. That placement is the whole point: the language has no static type checker of its own, so a fact that does not exist or a comparison that cannot hold would otherwise be discovered on somebody's real mail.
Methods
- Compile(string, string?, MailRuleConditionBounds)
Reads one rule's condition under the bounds the rule set was declared with.