Table of Contents

Method SaveAsync

Namespace
MailFathom.Application.Emails.ThreadStates
Assembly
MailFathom.Application.dll

SaveAsync(IPersistenceSession, EmailThreadState, CancellationToken)

Stages what one derivation settled about one conversation, inside the caller's session.

Task SaveAsync(IPersistenceSession session, EmailThreadState state, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The transaction the write joins.

state EmailThreadState

What was derived, which may hold no statements at all.

cancellationToken CancellationToken

Cancels the write.

Returns

Task

A task that completes when the record is staged.

Remarks

Idempotent from a fresh read: the record is keyed by the conversation, so two runs reaching one conversation converge on one row rather than on a history nobody asked for, and the statements a second write brings replace the first's rather than standing beside them.

Exceptions

ArgumentNullException

Thrown when state is null.