Table of Contents

Method ReadStateAsync

Namespace
MailFathom.Application.Emails.ThreadStates
Assembly
MailFathom.Application.dll

ReadStateAsync(EmailThreadId, MailboxScope, CancellationToken)

Reads the state of one conversation the scope admits.

Task<EmailThreadState?> ReadStateAsync(EmailThreadId threadId, MailboxScope scope, CancellationToken cancellationToken)

Parameters

threadId EmailThreadId

The conversation, which may be one a merge has since folded into another.

scope MailboxScope

The accounts and folders configuration admits.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<EmailThreadState>

The state, or null where no derivation has reached the conversation — which is what a client draws as not derived yet rather than as nothing to say. A conversation the scope admits no message of also reads as nothing, so a state is never published for an exchange this caller may not see. A state the conversation has changed since carries IsCurrent false, decided by the same comparison that puts the conversation back in front of the derivation.

Exceptions

ArgumentNullException

Thrown when scope is null.