Table of Contents

Class MailCalendarProposals

Namespace
MailFathom.Application.Calendar.Extraction
Assembly
MailFathom.Application.dll

Turns the dates a message named into proposals on the calendars of the people that mailbox serves.

public sealed class MailCalendarProposals
Inheritance
MailCalendarProposals
Inherited Members

Remarks

The half of the extraction that knows about calendars, kept apart from the pass that runs it so that the pass gains one collaborator rather than four and so that nothing in the enrichment boundary has to know how an event is composed. Reading and writing are separate members for one reason: the read is a provider call and the write joins the caller's transaction, and folding them together would either hold a transaction open across a network call or commit a proposal apart from the record that says the message has been read.

A mailbox two people are assigned proposes to both, through the same relation every other per-person fan-out reads. One reading is paid for and each person then decides for themselves, which is the only answer that works in both directions: writing to one of them would pick a person arbitrarily, and reading twice would charge the deployment twice for one message.

Nothing here writes an asserted event. Every row it stages is Proposed and cites the message it came from, so what a person meets is an offer their own act turns into a calendar entry.

Constructors

MailCalendarProposals(ICalendarEventExtractor, ICalendarEventStore, IMailAccountAssignments, TimeProvider)

Initializes the proposals over the reading that finds them and the calendars they reach.

Properties

IsActive

Gets whether this deployment proposes events from mail at all.

Methods

ReadAsync(EnrichableEmail, CancellationToken)

Reads one message into the events it names, without writing any of them.

StageAsync(IPersistenceSession, MailAccountId, StoredEmailId, IReadOnlyList<ExtractedCalendarEvent>, CancellationToken)

Stages what a reading found onto the calendar of each person the mailbox serves.