Table of Contents

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 flag change names a direction, a keyword change names the keywords, and a delete names none of them.

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.

DesiredFlaggedState

Gets which way a \Flagged change was asked for, and null for every other action.

DesiredSeenState

Gets which way a \Seen change 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.

Keywords

Gets the keywords a keyword action names, and null for every other action.

Mutation

Gets the change this action asks for.

Methods

AddKeywords(AuthoredMailKeywords)

Asks for keywords to be put on the matching email, beside the ones it already carries.

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.

RemoveKeywords(AuthoredMailKeywords)

Asks for keywords to be taken off the matching email, leaving the ones it is not asked about.

SetFlagged(bool)

Asks for the remote \Flagged flag of the matching email to be set or cleared.

SetKeywords(AuthoredMailKeywords)

Asks for the matching email's keywords to become exactly the set that was named.

SetSeen(bool)

Asks for the remote \Seen flag of the matching email to be set or cleared.