Method SubmitMoveAsync
- Namespace
- MailFathom.Application.Mail.Mutations
- Assembly
- MailFathom.Application.dll
SubmitMoveAsync(IPersistenceSession, MailboxMutationRequest, MailboxDestination, CancellationToken)
Records or commits a move a person asked for, answering one into the folder the message is in as already there.
public Task<SubmittedMailboxChange> SubmitMoveAsync(IPersistenceSession session, MailboxMutationRequest request, MailboxDestination destination, CancellationToken cancellationToken)
Parameters
sessionIPersistenceSessionThe transaction the move commits in.
requestMailboxMutationRequestThe move asked for.
destinationMailboxDestinationWhere the move files the message, resolved before the transaction opened.
cancellationTokenCancellationTokenCancels the write.
Returns
- Task<SubmittedMailboxChange>
The record written, the local move committed, or why neither happened.
Remarks
A rule's move into the folder a mirrored message is in is still recorded, as it always was, which is why the refusal is asked for rather than applied to every requester. The question is answered here rather than by the caller because it differs by phase: on a held account the folder a message is in is local, not the alias it was stored under.
Exceptions
- ArgumentNullException
Thrown when
sessionorrequestis null.