Method StageAsync
- Namespace
- MailFathom.Application.Calendar.Extraction
- Assembly
- MailFathom.Application.dll
StageAsync(IPersistenceSession, MailAccountId, StoredEmailId, IReadOnlyList<ExtractedCalendarEvent>, CancellationToken)
Stages what a reading found onto the calendar of each person the mailbox serves.
public Task<int> StageAsync(IPersistenceSession session, MailAccountId account, StoredEmailId sourceMessage, IReadOnlyList<ExtractedCalendarEvent> proposals, CancellationToken cancellationToken)
Parameters
sessionIPersistenceSessionThe session the writes join.
accountMailAccountIdThe mailbox the message arrived in, whose assigned people are proposed to.
sourceMessageStoredEmailIdThe message the events were read out of, which every proposal cites.
proposalsIReadOnlyList<ExtractedCalendarEvent>What the reading found, and empty where it found nothing.
cancellationTokenCancellationTokenCancels the staging.
Returns
Remarks
Staged rather than committed, so that the proposals and the record saying this message has been read become durable together: a commit that carried one without the other would either propose from a message a later run reads again or lose the proposals of a message nothing will offer twice.
Exceptions
- ArgumentNullException
Thrown when a required argument is null.