Method RequestAsync
- Namespace
- MailFathom.Application.Accounts.Custody
- Assembly
- MailFathom.Application.dll
RequestAsync(IPersistenceSession, MailAccountId, MailAccountCustody, CancellationToken)
Writes the custody an administrator asked for, leaving the phase where it stands.
Task<MailAccountCustodyState?> RequestAsync(IPersistenceSession session, MailAccountId account, MailAccountCustody requested, CancellationToken cancellationToken)
Parameters
sessionIPersistenceSessionThe transaction the switch commits in.
accountMailAccountIdThe account.
requestedMailAccountCustodyThe custody asked for.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<MailAccountCustodyState>
The state the account had before the write, or null where the deployment holds no such account.
Remarks
The phase is untouched deliberately. Asking for HoldMailbox does not make an account held — the account's
next run carries whatever it already asked its server for and moves the phase itself — and asking to mirror
again does not make it mirrored, because the mailbox has to be appended back first.