Table of Contents

Method SaveAsync

Namespace
MailFathom.Application.Emails.Enrichment
Assembly
MailFathom.Application.dll

SaveAsync(IPersistenceSession, EmailEnrichment, CancellationToken)

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

Task SaveAsync(IPersistenceSession session, EmailEnrichment enrichment, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The transaction the write joins.

enrichment EmailEnrichment

What was derived, which may hold no marks 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 message, so two runs reaching one message converge on one row rather than on a history nobody asked for, and the marks a second write brings replace the first's.

Exceptions

ArgumentNullException

Thrown when enrichment is null.