Class ContactBookOwnership
- Namespace
- MailFathom.Application.Contacts
- Assembly
- MailFathom.Application.dll
Answers which contact books the caller in hand reads, and which one their writes go into.
public sealed class ContactBookOwnership
- Inheritance
-
ContactBookOwnership
- Inherited Members
Remarks
The user axis enters a caller-facing contact read here and nowhere else, which is what keeps the scope from being a predicate every read has to remember to carry. Each act resolves it once and hands it to the store and the directory, and both take it as an argument rather than discovering it, so a read that forgot it does not compile.
A caller is admitted on a surface that serves one person their own mail, so the books they reach are that user's own and the collected book of every mail account assigned to them, which is the same set that decides which mail they read. A principal acting for nobody is refused rather than attributed to somebody: the deployment administrator names the user or the account whose book it reaches, and collection writes into the book of the account it is synchronizing, so neither of them arrives here at all.
That refusal is the whole of what this type is for. Resolving a principal that carries no user to "the single user this deployment serves" is what stopped working the day a deployment held several, and it could not be repaired by choosing one — an act attributed to whichever user a read happened to find is how one person is handed another person's correspondents.
Constructors
- ContactBookOwnership(AccessAuthorization, ContactBookScopes)
Initializes the resolution over the principal the work was admitted under.
Properties
- User
Gets the user whose own book this caller's writes go into.
Methods
- ReadScopeAsync(CancellationToken)
Reads the books this caller reads: their own first, then the collected book of each account they are assigned.