Table of Contents

Struct PresentationCitationId

Namespace
MailFathom.Application.Discovery.Presentation.Citations
Assembly
MailFathom.Application.dll

Names one citation within one plan, which is how a block points at the source behind a fact.

[JsonConverter(typeof(PresentationCitationIdJsonConverter))]
public readonly record struct PresentationCitationId : IEquatable<PresentationCitationId>
Implements
Inherited Members

Remarks

The identifier is local to the plan that declares it and means nothing outside it. That is deliberate: a block referring to a mail identifier directly would put the same identity in the plan as many times as it is cited, and a reader checking two facts against one message would have no way to see that they rest on the same source. One citation is declared once and referred to by this name as often as the answer needs it.

The spelling is restricted so a plan cannot smuggle content through a name a renderer prints beside a fact: lower-case ASCII letters, digits, and the hyphen, bounded in length. Being a struct, default is reachable and names nothing; it reports itself through IsSpecified and is refused wherever a citation is required.

Fields

MaxLength

The greatest number of characters one identifier may hold.

Properties

IsSpecified

Gets whether this value names a citation rather than the unusable struct default.

Value

Gets the identifier as the plan spells it.

Methods

Create(string?)

Creates a citation identifier.

ToString()

Returns the fully qualified type name of this instance.

TryCreate(string?, out PresentationCitationId)

Creates a citation identifier, reporting whether the value was acceptable instead of throwing.