Table of Contents

Class MailFolderEditor

Namespace
MailFathom.Application.Folders
Assembly
MailFathom.Application.dll

Creates, renames, moves, and deletes an account's folders, whichever copy of its mailbox is the truth.

public sealed class MailFolderEditor
Inheritance
MailFolderEditor
Inherited Members

Remarks

This is the one folder-management use case, and which of the two editors beneath it carries an act is decided here from the account's phase rather than by whoever asked. A caller states the act and the folder and is told what happened; nothing it receives says where the mail is kept, which is what keeps a client from branching on the storage mode and then being wrong about an account that changed mode since.

A folder is named by an identity whose shape is not part of the contract. On an account whose mailbox MailFathom holds it is the local folder's own identity; on a mirrored one it is the alias the folder is declared under. Both are read as text, and text that is neither is answered as a folder the account does not have rather than as a malformed request — a caller can only have got such a value from this surface.

An account whose mailbox is being restored to its source allows nothing. Its local folders are still the truth and its source is being filled back up from them, so an act on either side would be an act against a mailbox that is half in each place; the acts come back when the restore ends.

An account is narrowed to the caller's assignments here, which is the only place it is: both editors beneath take the account's generated identifier and neither knows who asked, and the transport surface passes on whatever a request named. An account this caller is not assigned is answered exactly as one the deployment never served, so a refusal never says which mailboxes exist beside their own.

Constructors

MailFolderEditor(LocalMailFolderEditor, MirroredMailFolderEditor, AccessAuthorization, ICallerMailAccountCatalog)

Initializes a new instance of the MailFolderEditor class.

Methods

CreateAsync(MailAccountId, string?, string?, MailFolderSpecialUse?, CancellationToken)

Creates a folder, either by naming it or by naming the role it is to play.

DeleteAsync(MailAccountId, string?, CancellationToken)

Deletes a folder, which means whatever the account's own rules make it mean.

MoveAsync(MailAccountId, string?, string?, CancellationToken)

Moves a folder, with everything beneath it, to another place in the hierarchy.

ReadAsync(MailAccountId, CancellationToken)

Reads the account's folders and which acts each of them and the account itself allow.

RenameAsync(MailAccountId, string?, string?, CancellationToken)

Renames a folder, leaving it where it is.