Class MailRuleAction
- Namespace
- MailFathom.Application.Rules.Actions
- Assembly
- MailFathom.Application.dll
One change a matching rule asks for, named as the mutation it will be requested through.
public sealed record MailRuleAction : IEquatable<MailRuleAction>
- Inheritance
-
MailRuleAction
- Implements
- Inherited Members
Remarks
The set an action may name is exactly All, because a rule asks for a change through
the same record every other requester uses and nothing here issues a command of its own. What this adds over the
mutation is the parameter the rule declared: a relocation and a copy name a destination folder, a \Seen
change names a direction, and a delete names neither.
The destination is a reference rather than a remote path, because MailFathom's own names for a folder — its alias and the role it plays — survive the server renaming what they are bound to. Which folder the reference means, and then which path that folder currently has, are both resolved when the request is written, which is what makes a destination that has stopped being resolvable fail visibly instead of being filed somewhere else.
The factories are the only way to build one, so an action carrying a parameter its mutation does not take cannot be constructed — the same invariant MailboxMutationRequest holds one layer down.
Properties
- CanonicalForm
Gets the form this action is rendered in for a rule set's derived revision identity.
- DesiredSeenState
Gets which way a
\Seenchange was asked for, and null for every other action.
- Destination
Gets how a relocation or a copy names its folder, and null for every other action.
- Mutation
Gets the change this action asks for.
Methods
- Copy(MailFolderReference)
Asks for a second live occurrence of the matching email to be put into another folder.
- Delete()
Asks for the matching email to be removed from the folder it is in.
- Relocate(MailFolderReference)
Asks for the matching email to be moved into another folder.
- SetSeen(bool)
Asks for the remote
\Seenflag of the matching email to be set or cleared.