Class EmailAddressJsonConverter
- Namespace
- MailFathom.Application.Discovery.Presentation
- Assembly
- MailFathom.Application.dll
Serializes EmailAddress as the bare address a message wrote, which is what a plan publishes.
public sealed class EmailAddressJsonConverter : JsonConverter<EmailAddress>
- Inheritance
-
EmailAddressJsonConverter
- Inherited Members
Remarks
One string rather than the three members the value holds. The comparison form is an internal key for grouping and indexing and means nothing to a client, and the display name is carried by whichever block holds the address — publishing it twice would let a plan disagree with itself about what somebody is called.
Declared beside the contract rather than on the domain type, for the reason StoredEmailIdJsonConverter gives: how an address is published is this boundary's decision rather than one an address should take for every boundary that ever meets it.
Fields
- MaxOctets
The greatest number of octets an address may arrive as.
Methods
- Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts the JSON to type EmailAddress.
- Write(Utf8JsonWriter, EmailAddress, JsonSerializerOptions)
Writes a specified value as JSON.