Class ContactRecordDraft
- Namespace
- MailFathom.Application.Contacts
- Assembly
- MailFathom.Application.dll
The record a caller wants a contact to have, as the caller wrote it and before any rule has judged it.
public sealed record ContactRecordDraft : IEquatable<ContactRecordDraft>
- Inheritance
-
ContactRecordDraft
- Implements
- Inherited Members
Remarks
A draft states the whole record rather than a change to one, because that is what a write to the book is: adding an address, dropping one, choosing a different default, and correcting a name are one operation whose result the invariants can be checked against, instead of four that could each leave a contact without an address.
Every field is text a caller supplied, which is what makes this a draft rather than a record. The values become domain ones inside the use case, so the rules the book holds — what a name may carry, which addresses are usable, which of them may be preferred, how long a note may be — are applied in one place for every writer.
A name, an address, and a note are personal data about a third party. Nothing logs a draft, and no refusal it produces repeats a value it carried.
Properties
- Addresses
Gets every address this person uses, at most MaximumAddressCount values, of which two spellings of one address are stored as one.
- DisplayName
Gets the name to record for this person.
- PreferredAddress
Gets the address to use by default, which must be one of Addresses.