Method MovePhaseAsync
- Namespace
- MailFathom.Application.Accounts.Custody
- Assembly
- MailFathom.Application.dll
MovePhaseAsync(IPersistenceSession, MailAccountId, MailAccountCustodyPhase, MailAccountCustodyPhase, CancellationToken)
Moves one account's phase, but only from the phase it was decided from.
Task<bool> MovePhaseAsync(IPersistenceSession session, MailAccountId account, MailAccountCustodyPhase decidedFrom, MailAccountCustodyPhase moveTo, CancellationToken cancellationToken)
Parameters
sessionIPersistenceSessionThe transaction the move commits in.
accountMailAccountIdThe account.
decidedFromMailAccountCustodyPhaseThe phase the caller read before deciding.
moveToMailAccountCustodyPhaseThe phase to write.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
Remarks
A refused move is an ordinary answer: another replica moved the account, and this one re-reads rather than writing over it.