Table of Contents

Method BeginWriteAsync

Namespace
MailFathom.Application.Mail.Export
Assembly
MailFathom.Application.dll

BeginWriteAsync(MailboxExportId, CancellationToken)

Opens a write the archive is produced into, under a key minted for it.

Task<MailboxExportArchiveWrite> BeginWriteAsync(MailboxExportId exportId, CancellationToken cancellationToken)

Parameters

exportId MailboxExportId

The export the archive belongs to, which reaches the key as a segment.

cancellationToken CancellationToken

Cancels opening the write.

Returns

Task<MailboxExportArchiveWrite>

The write, carrying the key and the stream the archive is produced into.

Remarks

Nothing is readable under the key until the write is completed, which is what keeps a failed export from leaving a partial archive anybody could download. A write abandoned without completing leaves nothing behind.