Table of Contents

Method ReadAsync

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

ReadAsync(IPersistenceSession, MailAccountId, CancellationToken)

Reads the account's phase and folders inside the transaction a write will commit.

Task<LocalMailFolderHolding?> ReadAsync(IPersistenceSession session, MailAccountId account, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The transaction the edit commits in.

account MailAccountId

The account.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<LocalMailFolderHolding>

The holding, or null where the deployment holds no such account.

Remarks

A later SaveAsync(IPersistenceSession, MailAccountId, IReadOnlyCollection<LocalMailFolder>, IReadOnlyCollection<LocalMailFolderId>, CancellationToken) in the same session is conditional on the hierarchy not having changed since this read, so two edits reaching one account at once conflict and the loser decides again from what the winner wrote rather than both committing against the same picture.

ReadAsync(MailAccountId, CancellationToken)

Reads the account's phase and folders, joining no transaction.

Task<LocalMailFolderHolding?> ReadAsync(MailAccountId account, CancellationToken cancellationToken)

Parameters

account MailAccountId

The account.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<LocalMailFolderHolding>

The holding, or null where the deployment holds no such account.