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 accountId, ThreadedEmail email, EmailThreadId? currentThreadId, CancellationToken cancellationToken)
Parameters
sessionIPersistenceSessionThe transaction the placement is part of.
accountIdMailAccountIdThe account whose mail the email is.
emailThreadedEmailThe email to place, with the identifiers its headers carried.
currentThreadIdEmailThreadId?The conversation the email already belongs to, or null when none.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<EmailThreadId>
The conversation the email now belongs to.
Exceptions
- ArgumentNullException
Thrown when
emailis null.