Method FindRefusal
- Namespace
- MailFathom.Application.Rules.Actions
- Assembly
- MailFathom.Application.dll
FindRefusal(IReadOnlyCollection<MailRuleAction>, MailRuleAction)
Reports why one further action cannot join the actions already being applied to one email.
public static string? FindRefusal(IReadOnlyCollection<MailRuleAction> honored, MailRuleAction candidate)
Parameters
honoredIReadOnlyCollection<MailRuleAction>The actions that will be applied, which may come from more than one rule.
candidateMailRuleActionThe action being considered.
Returns
Remarks
Written over an accumulated list rather than over one rule's declaration, because two rules matching one email can name incompatible fates exactly as one rule can. Reading both cases through this method is what makes the answer the same in either: whichever fate is reached first in declared order is the one applied.
Exceptions
- ArgumentNullException
Thrown when an argument is null.