Class CalendarEvent
- Namespace
- MailFathom.Domain.Calendar
- Assembly
- MailFathom.Domain.dll
Holds one event this deployment knows about: what it is, when it is, and how it came to be here.
public sealed class CalendarEvent
- Inheritance
-
CalendarEvent
- Inherited Members
Remarks
A MailFathom event is native to this deployment and to nothing else. No calendar protocol is synchronized against, so nothing here is a local copy of a row some server owns: what is written is what a person typed, what they imported from a file they chose, or what a reading of their mail proposed to them.
Origin is what separates the calendar from what is merely offered to it, and accepting a proposal changes that value on this event rather than producing a second one. That is why the type is an entity: Id is what makes two records the same event, and every method here answers with a new instance carrying that identity.
SourceMessage is a pointer rather than a copy. An event that came out of a message keeps the message's identity so the thread can be opened from it, and nothing about the message — not its subject, not its participants, not a line of its body — is written here.
The title, the times, and the message an event cites are personal data. They are never logged, never a metric dimension, and never written into a failure message; Id is what a failure names.
Fields
- AllDayReminderHour
The hour an all-day event's reminders are measured back from, in the offset the event carries.
Properties
- AmendedAt
Gets when it was last amended or accepted, which equals RecordedAt until one happens.
- AnchorsRemindersAt
Gets the instant every reminder on this event is measured back from.
- Id
Gets what identifies this event, which neither an amendment nor an acceptance changes.
- ImportedUid
Gets the identifier the file this event was imported from named it by, or null when none did.
- IsAllDay
Gets whether the event is stated as a day rather than as a clock time.
- Origin
Gets whether this event is on the calendar or offered to it.
- RecordedAt
Gets when this event was first written here.
- Reminders
Gets the leads this event is to be announced at, longest first, which is empty where nothing announces it.
- SourceMessage
Gets the message this event came out of, or null when no message named it.
- Start
Gets when the event begins.
- Title
Gets what this event is called.
Methods
- Accepted(DateTimeOffset)
Produces this proposal as an event on the calendar, under the identity it already had.
- AmendedWith(CalendarEventTitle, DateTimeOffset, DateTimeOffset?, bool, IReadOnlyCollection<Reminder>, DateTimeOffset)
Produces this event with what an amendment replaced, keeping its identity, its origin, and where it came from.
- Create(CalendarEventId, CalendarEventTitle, DateTimeOffset, DateTimeOffset?, bool, IReadOnlyCollection<Reminder>, CalendarEventOrigin, StoredEmailId?, ImportedCalendarEventUid?, DateTimeOffset, DateTimeOffset)
Builds an event from what a writer supplied, enforcing every invariant the calendar rests on.
- RemindsAt(Reminder)
Reports the instant one of this event's reminders falls at.