Table of Contents

Method FindErrors

Namespace
MailFathom.Application.Rules.Actions
Assembly
MailFathom.Application.dll

FindErrors(string, IReadOnlyList<MailRuleAction>)

Reports every reason the declared actions could not be honored together.

public static IReadOnlyList<string> FindErrors(string ruleName, IReadOnlyList<MailRuleAction> actions)

Parameters

ruleName string

The rule the actions belong to, which every message names.

actions IReadOnlyList<MailRuleAction>

The actions as they were declared.

Returns

IReadOnlyList<string>

One message per refused action, empty when the combination is one MailFathom applies.

Remarks

Reported rather than thrown, because this is what an operator reads while their configuration is being validated and every defect in a rule set is reported together. Create(IReadOnlyList<MailRuleAction>) refuses the same combinations, which is what keeps a set built without this check from reaching a mailbox.

Exceptions

ArgumentNullException

Thrown when actions is null.