Method Delete
- Namespace
- MailFathom.Domain.Folders
- Assembly
- MailFathom.Domain.dll
Delete(LocalMailFolderId)
Decides deleting a folder: into the trash, or out of existence where it is already there.
public LocalMailFolderEdit Delete(LocalMailFolderId id)
Parameters
idLocalMailFolderIdThe folder.
Returns
- LocalMailFolderEdit
The folder moved into the trash, the subtree to erase, or the refusal.
Remarks
The move into the trash is not held to MaximumDepth: it takes the subtree out of the live hierarchy rather than deeper into it, so a folder any legal hierarchy can hold can always be deleted.
Exceptions
- InvalidOperationException
Thrown when the tree has no trash folder, which MissingProtectedFolders(Func<LocalMailFolderId>) supplies.