Table of Contents

Method ReadRecentThreadsAsync

Namespace
MailFathom.Application.Contacts.Correspondence
Assembly
MailFathom.Application.dll

ReadRecentThreadsAsync(MailboxScope, IReadOnlyList<string>, DateTimeOffset, CancellationToken)

Reads the most recent conversations naming any of the addresses.

Task<IReadOnlyList<CorrespondingThread>> ReadRecentThreadsAsync(MailboxScope scope, IReadOnlyList<string> normalizedAddresses, DateTimeOffset correspondedOnOrAfter, CancellationToken cancellationToken)

Parameters

scope MailboxScope

The accounts and folders the caller may read, which the query is narrowed by.

normalizedAddresses IReadOnlyList<string>

The comparison forms of the contact's addresses, which is the only form anything here matches on.

correspondedOnOrAfter DateTimeOffset

The start of the window, before which nothing is read.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<IReadOnlyList<CorrespondingThread>>

At most Threads conversations, newest first, and empty where the window holds none.

Remarks

A message whose received instant is unknown is outside every window and is therefore absent, which follows from the comparison rather than from a decision here and is the honest answer: nobody can say it arrived inside the window somebody asked about.