Method MoveAsync
- Namespace
- MailFathom.Application.Folders
- Assembly
- MailFathom.Application.dll
MoveAsync(MailAccountId, string?, string?, CancellationToken)
Moves a folder, with everything beneath it, to another place in the hierarchy.
public Task<MailFolderActOutcome> MoveAsync(MailAccountId account, string? folderId, string? parentId, CancellationToken cancellationToken)
Parameters
accountMailAccountIdThe caller's account.
folderIdstringThe folder.
parentIdstringThe folder to move it beneath, or null for the top of the hierarchy.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<MailFolderActOutcome>
The moved folder, or the refusal.
Exceptions
- PrincipalNotAuthorizedException
Thrown when the caller does not hold
mailfathom.mail.folders.writeandmailfathom.mail.read, both of which an act needs.