Struct ImportedCalendarEventUid
- Namespace
- MailFathom.Domain.Calendar
- Assembly
- MailFathom.Domain.dll
Carries the UID a VEVENT named itself by, for an event that came out of a file.
public readonly record struct ImportedCalendarEventUid : IEquatable<ImportedCalendarEventUid>
- Implements
- Inherited Members
Remarks
RFC 5545 gives every entry in an iCalendar file a persistent, globally unique identifier, and this is that value kept as the file wrote it. It exists for one question, asked by whoever reads such a file: has this entry already been imported here. Nothing else reads it, an event a person typed or a proposal read out of mail carries none, and it never identifies an event within MailFathom — CalendarEventId does.
It is compared as written rather than case-insensitively or after any other normalization. The specification makes it an opaque string whose only property is equality, so two spellings of one identifier are two identifiers to everybody producing them, and folding them together here would recognize as a repeat an entry the file says is a different one.
Fields
- MaximumLength
The greatest length an imported identifier may carry.
Properties
- IsSpecified
Gets whether this value carries an identifier, which the default of the struct does not.
- Value
Gets the identifier as the file wrote it, trimmed of surrounding whitespace.
Methods
- Create(string?)
Reads an identifier that is expected to be one.
- TryCreate(string?, out ImportedCalendarEventUid)
Reads an identifier out of a file, refusing one that is blank, too long, or carrying a character that renders as nothing.