Table of Contents

Method RecordAppendIssuedAsync

Namespace
MailFathom.Application.Mail.Delivery.Filing
Assembly
MailFathom.Application.dll

RecordAppendIssuedAsync(IPersistenceSession, OutgoingEmailId, OutgoingMailFiling, MailFolderResolution, DateTimeOffset, CancellationToken)

Writes down that an append is about to be issued, before the command goes out.

Task RecordAppendIssuedAsync(IPersistenceSession session, OutgoingEmailId outgoingEmailId, OutgoingMailFiling filing, MailFolderResolution destination, DateTimeOffset appendedAt, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session the write joins.

outgoingEmailId OutgoingEmailId

The record the copy is filed from.

filing OutgoingMailFiling

Which place the copy is going into.

destination MailFolderResolution

The folder binding the copy is appended to.

appendedAt DateTimeOffset

When the append was issued.

cancellationToken CancellationToken

Cancels the write.

Returns

Task

A task that completes when the row is durable.

Remarks

It is written first for the reason a mutation record is: a process that dies between this write and the server's answer leaves a statement that the copy may be in the folder, and nothing appends again on the strength of it.

Exceptions

ArgumentNullException

Thrown when session or destination is null.

InvalidOperationException

Thrown when no record carries outgoingEmailId, or when this place is already filed.