Method RecordFilingObservedAsync
- Namespace
- MailFathom.Application.Mail.Delivery.Filing
- Assembly
- MailFathom.Application.dll
RecordFilingObservedAsync(IPersistenceSession, OutgoingEmailId, OutgoingMailFiling, DateTimeOffset, CancellationToken)
Writes down that synchronization has met the copy one filing put in a folder.
Task RecordFilingObservedAsync(IPersistenceSession session, OutgoingEmailId outgoingEmailId, OutgoingMailFiling filing, DateTimeOffset observedAt, CancellationToken cancellationToken)
Parameters
sessionIPersistenceSessionThe session the write joins, which is the one the discovered email is stored in.
outgoingEmailIdOutgoingEmailIdThe record the copy was filed from.
filingOutgoingMailFilingWhich place the copy was recognized in.
observedAtDateTimeOffsetWhen the run recognized it.
cancellationTokenCancellationTokenCancels the write.
Returns
- Task
A task that completes when the observation is written.
Remarks
It joins the transaction that stores the email, so a run that recorded the observation and then rolled the row back cannot leave a filing claiming to have been met by a message no local state holds. Writing it is also what takes the row out of the candidates a later discovery is matched against.
Exceptions
- ArgumentNullException
Thrown when
sessionis null.- InvalidOperationException
Thrown when no row carries that identity.