Table of Contents

Class CalendarEventDescription

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

One sentence somebody typed to describe an event, and the instant they typed it at.

public sealed record CalendarEventDescription : IEquatable<CalendarEventDescription>
Inheritance
CalendarEventDescription
Implements
Inherited Members

Remarks

The instant is theirs rather than the deployment's, and it carries the offset as well as the day precisely because both are needed: Tuesday at three names a day only against the day somebody is standing on, and an hour only against the zone they are standing in. A deployment resolving either from its own clock would write an event into a day and an hour nobody asked for, which is the one mistake a draft of this kind cannot recover from — the person is shown a plausible time and saves it.

The text is bounded and otherwise unexamined. It is sent to a provider and never stored, so the rules a stored value carries belong to the title that comes back rather than to the sentence that went out.

Fields

MaximumTextLength

The greatest length a description may carry.

Properties

Text

Gets the sentence as it was typed, trimmed.

WrittenAt

Gets the instant the person was standing on, which every relative day and hour is resolved against.

Methods

TryCreate(string?, DateTimeOffset, out CalendarEventDescription?)

Reads a description, refusing one that is blank or longer than a sentence.