Table of Contents

Class MailFolderDirectoryReader

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

Reads the user's mailboxes and their folders as the one tree a mail screen is drawn from.

public sealed class MailFolderDirectoryReader
Inheritance
MailFolderDirectoryReader
Inherited Members

Remarks

It answers in one read what a screen would otherwise assemble from three: which mailboxes there are, which folders each of them has and where those sit in the server's hierarchy, and how current every one of them is. Splitting any of that off would make drawing one tree several requests whose answers disagree with each other by the time the last one arrives — which is the shape this surface exists not to have.

The accounts and every freshness reading are MailAccountFreshnessReader's, composed rather than re-derived, so the folder tree and the mailbox list beside it cannot come to disagree about the same account. What is added here is what that reading has no reason to carry: the role each folder plays, its place in the mail server's hierarchy, and how much mail is stored in it.

The folders are the ones configuration maps, which is a wider answer than the composed reading gives: that reading is of local state, and a folder an operator asked not to mirror is never scheduled, so no run ever discovers it. It is still a folder the account has and still a folder MailFathom files into — resolution is indifferent to mirroring — so it is published beside the mirrored ones as never synchronized, at the place its declaration names and with no mail here. A client that could not see it would be told an account has nowhere to put a deleted message while its mailbox has a trash folder.

It reaches no mail server and returns no mail. Folder names, roles, counts, and instants are the whole of it, and asking cannot set the remote \Seen flag.

Constructors

MailFolderDirectoryReader(MailAccountFreshnessReader, MailboxScopeResolver, IStoredMailFolderReader, IMailFolderMappingReader)

Initializes the use case.

Methods

ReadAsync(CancellationToken)

Reads the user's mailboxes and every folder a screen may draw beneath them.