Table of Contents

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

session IPersistenceSession

The transaction the switch commits in.

account MailAccountId

The account.

requested MailAccountCustody

The custody asked for.

cancellationToken CancellationToken

Propagates 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.