Method ApplicationOrderOf
- Namespace
- MailFathom.Application.Rules.Actions
- Assembly
- MailFathom.Application.dll
ApplicationOrderOf(MailRuleAction)
Ranks one action within the fixed order every permitted combination is applied in.
public static int ApplicationOrderOf(MailRuleAction action)
Parameters
actionMailRuleActionThe action to rank.
Returns
- int
Its position in the order, lowest first.
Remarks
Every flag and keyword change first and the relocation or the delete last, so every permitted combination acts on the occurrence the condition matched. It is published because the same order governs the actions of two rules matching one email, which no single rule's set can order on its own. A closed enumeration's members are not compile-time constants, so the rank is decided by comparison rather than by a switch over cases.
One pair among the flag and keyword changes decides something observable, and it is the reason RemoveKeywords is ranked ahead of AddKeywords: a keyword one rule takes off and another puts on ends up on the message, rather than depending on which rule was written first. Reordering those two ranks silently reverses that. The rest is fixed for determinism rather than for meaning — each of them writes a different flag, and the one pair that would contradict another is refused before it gets here.
Exceptions
- ArgumentNullException
Thrown when
actionis null.