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
sessionIPersistenceSessionThe transaction the write joins.
enrichmentEmailEnrichmentWhat was derived, which may hold no marks at all.
cancellationTokenCancellationTokenCancels 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
enrichmentis null.