Table of Contents

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

honored IReadOnlyCollection<MailRuleAction>

The actions that will be applied, which may come from more than one rule.

candidate MailRuleAction

The action being considered.

Returns

string

The reason it is refused, or null when it can be applied beside them.

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.