Table of Contents

Method AssembleAsync

Namespace
MailFathom.Application.Emails.Threads
Assembly
MailFathom.Application.dll

AssembleAsync(IPersistenceSession, MailAccountId, ThreadedEmail, EmailThreadId?, CancellationToken)

Places the email, merging any conversations its identifiers prove were always one.

public Task<EmailThreadId> AssembleAsync(IPersistenceSession session, MailAccountId account, ThreadedEmail email, EmailThreadId? currentThreadId, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The transaction the placement is part of.

account MailAccountId

The account whose mail the email is, by its generated identifier.

email ThreadedEmail

The email to place, with the identifiers its headers carried.

currentThreadId EmailThreadId?

The conversation the email already belongs to, or null when none.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<EmailThreadId>

The conversation the email now belongs to.

Exceptions

ArgumentNullException

Thrown when email is null.