Table of Contents

Method StoreLocalCopyAsync

Namespace
MailFathom.Application.Synchronization
Assembly
MailFathom.Application.dll

StoreLocalCopyAsync(IPersistenceSession, MailAccountId, MailFolderResolutionId, ExtractedEmailMetadata?, long, CopiedMailFlags, CancellationToken)

Stores the second message a copy on a held account produces, with no occurrence on any server.

Task<StoredEmailId?> StoreLocalCopyAsync(IPersistenceSession session, MailAccountId account, MailFolderResolutionId binding, ExtractedEmailMetadata? extractedMetadata, long sizeOctets, CopiedMailFlags flags, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The explicit persistence session this write participates in.

account MailAccountId

The account the copy is stored for.

binding MailFolderResolutionId

The folder binding the copy is stored under, which is the copied message's own.

extractedMetadata ExtractedEmailMetadata

What was read out of the copied message's MIME, or null when nothing could be.

sizeOctets long

How large the message is.

flags CopiedMailFlags

The flags and keywords the copied message carries, which the copy takes.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<StoredEmailId?>

The copy's identity, or null where binding names a folder binding that is no longer stored.

Remarks

A binding that is gone is answered rather than raised, for the reason StoreFiledEmailAsync(IPersistenceSession, MailAccountId, MailFolderResolutionId, ExtractedEmailMetadata?, long, AppendedMailFlags, OutgoingEmailId?, CancellationToken) answers one: it was read before the transaction, and the rest of the change the copy belongs to still commits.

The row is stamped as evaluated by the rules, because the copy is MailFathom's own act rather than mail that arrived. It is the local counterpart of the suppression ADR 0008 gives a copy on a mirrored account, where the arrival is withheld from rule evaluation by the record that placed it: without it, a rule that copies into a folder it also matches on would meet its own copy and copy it again.