Table of Contents

Method StageAttachmentAsync

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

StageAttachmentAsync(IPersistenceSession, MailDraftId, AuthoredEmailAttachment, DateTimeOffset, CancellationToken)

Stages one file against a draft, so every later revision is composed with it.

Task<MailDraftAttachment> StageAttachmentAsync(IPersistenceSession session, MailDraftId draftId, AuthoredEmailAttachment file, DateTimeOffset stagedAt, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session the write joins.

draftId MailDraftId

The draft the file is attached to.

file AuthoredEmailAttachment

What the file is called, what it declares itself to be, and the octets it is made of.

stagedAt DateTimeOffset

When the upload was taken in.

cancellationToken CancellationToken

Cancels the write.

Returns

Task<MailDraftAttachment>

The staged file as the write left it.

Exceptions

ArgumentNullException

Thrown when session or file is null.

InvalidOperationException

Thrown when no draft is held under draftId.