Table of Contents

Method RecordAsync

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

RecordAsync(IPersistenceSession, StoredEmailId, EmailOccurrenceId, MailRuleActionPlan, MailRuleSetRevision, MailboxDestinations, CancellationToken)

Opens one mutation record per action the plan honors, in the order the changes are applied.

public Task<MailRuleActionRecording> RecordAsync(IPersistenceSession session, StoredEmailId storedEmailId, EmailOccurrenceId occurrence, MailRuleActionPlan plan, MailRuleSetRevision revision, MailboxDestinations destinations, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session the records are staged in, which is the one the batch commits.

storedEmailId StoredEmailId

The local email the rules matched.

occurrence EmailOccurrenceId

Where that email is, which is what an IMAP command will be issued against.

plan MailRuleActionPlan

What the matching rules together ask for.

revision MailRuleSetRevision

The rule set revision the pass ran under, which is part of every request's identity.

destinations MailboxDestinations

Where the folders this batch's actions name currently are, resolved before the transaction opened.

cancellationToken CancellationToken

Cancels the staging.

Returns

Task<MailRuleActionRecording>

Every action a record was opened for, with the record that carries it, and every action nothing was opened for.

Exceptions

ArgumentNullException

Thrown when an argument is null.

ArgumentException

Thrown when revision names no rule set.