Class ContactAmendment
- Namespace
- MailFathom.Application.Contacts
- Assembly
- MailFathom.Application.dll
The record a caller wants one contact to have, and the origin it is asking under.
public sealed record ContactAmendment : IEquatable<ContactAmendment>
- Inheritance
-
ContactAmendment
- Implements
- Inherited Members
Remarks
An amendment states the whole record rather than the difference from the one held. Adding an address, dropping one, choosing a different default, and correcting a name are then one operation whose result the invariants can be checked against, instead of four that could each leave a contact without an address or with a default it does not hold.
Writer is the authority rather than a value to store: a contact is amendable only by a writer of its own origin, and nothing about an amendment can change which origin a contact has. Promotion is the one act that does.
Properties
- Addresses
Gets every address the contact is to hold afterwards.
- ContactId
Gets the contact to amend.
- DisplayName
Gets the name the contact is to carry.
- PreferredAddress
Gets the address to use by default, which must be one of Addresses.
- Writer
Gets the origin the writer acts under.