Method Create
- Namespace
- MailFathom.Application.Rules
- Assembly
- MailFathom.Application.dll
Create(IReadOnlyList<MailRule>, MailRuleSetRevision, MailRuleConditionBounds)
Creates a rule set from rules that have already been proven usable.
public static MailRuleSet Create(IReadOnlyList<MailRule> rules, MailRuleSetRevision revision, MailRuleConditionBounds bounds)
Parameters
rulesIReadOnlyList<MailRule>The rules, in declared order.
revisionMailRuleSetRevisionThe identity derived from the declarations the rules were compiled from.
boundsMailRuleConditionBoundsThe bounds the rules were read under.
Returns
- MailRuleSet
The rule set a pass runs against.
Remarks
Names are unique because a rule is reported by its name, and two rules answering to one name would leave a record of a match naming something the configuration does not identify. Comparison ignores case, so a set cannot declare two rules an operator would read as one.
Exceptions
- ArgumentNullException
Thrown when an argument is null.
- ArgumentException
Thrown when a rule is null, two rules share a name, or the revision is unspecified.