Interface IDeploymentMailAccountCatalog
- Namespace
- MailFathom.Application.Accounts
- Assembly
- MailFathom.Application.dll
Describes every mail account this deployment serves, whoever owns it.
public interface IDeploymentMailAccountCatalog
Remarks
This is the deployment's own answer and it belongs to work the deployment does for itself: the synchronization coordinator that starts a run per account, the schedule that evaluates rules against each of them, the status an operator reads, and the administrative operations an operator performs on an account they name. None of those acts for one user, and each of them would be wrong if it saw one user's half of the deployment.
It is deliberately not what a caller-facing use case reads. A read that answers a person about their own mail asks ICallerMailAccountCatalog instead, and the two are separate ports with differently named members so a read model that reaches for the wrong one names the wrong member rather than compiling and answering across users. The rule is on the operation rather than on the surface: an administrative operation reaches this one, and an operation a person performs about their own accounts reaches the other, and an operation that is both is two operations.
An account nobody configured is refused rather than answered with an empty page, because at a boundary a client reaches, an empty page tells the client the name exists and holds no mail, which turns a list operation into a way to enumerate accounts.
Properties
- SynchronizationEnabled
Gets whether this deployment refreshes the local copy of these accounts at all.
Methods
- ReadServedAccountsAsync(IReadOnlyCollection<MailAccountId>, CancellationToken)
Reads which of the named accounts this deployment serves.
- ReadServedAccountsAsync(CancellationToken)
Reads every account this deployment serves from the account records, deduplicated and ordered.