Table of Contents

Interface IContactDirectory

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

Reads the contact book: one person by identity or by an address they use, a set of them by identity or by name, and a page of the whole.

public interface IContactDirectory

Remarks

Every read joins no transaction and returns complete contacts rather than an entity graph, which is why it is a port of its own beside IContactStore rather than a set of methods on it. Every lookup is answered from an index rather than from a scan, and the page is bounded and ordered so a walk of the book terminates.

Methods

FindAllAsync(IReadOnlyCollection<ContactId>, CancellationToken)

Reads several contacts by the identities the book gave them.

FindAsync(ContactId, CancellationToken)

Reads one contact by the identity the book gave it.

FindByAddressAsync(EmailAddress, CancellationToken)

Reads the person who uses one address.

FindHoldersOfAsync(IReadOnlyCollection<EmailAddress>, CancellationToken)

Reads which contacts already hold each of the given addresses.

MatchDisplayNamesAsync(IReadOnlyCollection<ContactDisplayName>, CancellationToken)

Reads who each name resolves to, by the whole of that name rather than by part of it.

ReadPageAsync(ContactQuery, CancellationToken)

Reads one bounded page of the book.