Method SaveAttachmentTextAsync
- Namespace
- MailFathom.Application.Emails.AttachmentText
- Assembly
- MailFathom.Application.dll
SaveAttachmentTextAsync(IPersistenceSession, StoredEmailId, EmailAttachmentTextDerivation, CancellationToken)
Stores one message's attachment readings, the passages they yield, and the fact that it was read.
Task SaveAttachmentTextAsync(IPersistenceSession session, StoredEmailId emailId, EmailAttachmentTextDerivation derived, CancellationToken cancellationToken)
Parameters
sessionIPersistenceSessionThe explicit persistence session this write participates in.
emailIdStoredEmailIdThe message the readings belong to.
derivedEmailAttachmentTextDerivationWhat its attachments yielded and the configuration they were read under.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task
A task that completes when the write has been staged.
Remarks
One statement for all three, because a message stamped as read whose readings did not commit would never be offered to a parser again, and readings committed without the stamp would be read a second time on the next run. The passages are cut here rather than by the caller for the reason every other passage is: one writer decides what a stored chunk is, so nothing can store passages built to different rules.
Exceptions
- ArgumentNullException
Thrown when any reference argument is null.