Method PauseAsync
- Namespace
- MailFathom.Application.EmailContent.Move
- Assembly
- MailFathom.Application.dll
PauseAsync(CancellationToken)
Stops the move where it is, leaving everything it has already carried exactly as it is.
public Task<StoredContentMoveRun?> PauseAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenCancels the write.
Returns
- Task<StoredContentMoveRun>
The move as it now stands, or null when this deployment has never been asked for one.
Remarks
Nothing is cancelled. A pass that is running reads this decision between payloads, so it finishes the message it holds — already put and verified — and ends there rather than carrying the rest of what its ceilings allowed. A move that has finished is left as it is rather than reported as an error: there is nothing to pause, and saying so is the answer.
Exceptions
- PrincipalNotAuthorizedException
Thrown when the use case was reached by anything but a caller granted AdminOperate.
- PersistenceConcurrencyConflictException
Thrown when this decision and a running pass's own commit raced past the bounded retries.