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
sessionIPersistenceSessionThe session the records are staged in, which is the one the batch commits.
storedEmailIdStoredEmailIdThe local email the rules matched.
occurrenceEmailOccurrenceIdWhere that email is, which is what an IMAP command will be issued against.
planMailRuleActionPlanWhat the matching rules together ask for.
revisionMailRuleSetRevisionThe rule set revision the pass ran under, which is part of every request's identity.
destinationsMailboxDestinationsWhere the folders this batch's actions name currently are, resolved before the transaction opened.
cancellationTokenCancellationTokenCancels 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
revisionnames no rule set.