Table of Contents

Method FindHeldAddressesAsync

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

FindHeldAddressesAsync(ContactBookScope, IReadOnlyCollection<EmailAddress>, CancellationToken)

Reads which of the given addresses some contact the scope shows already holds.

Task<IReadOnlySet<EmailAddress>> FindHeldAddressesAsync(ContactBookScope scope, IReadOnlyCollection<EmailAddress> addresses, CancellationToken cancellationToken)

Parameters

scope ContactBookScope

The books read.

addresses IReadOnlyCollection<EmailAddress>

The addresses to look up, at most as many as one contact may hold.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<IReadOnlySet<EmailAddress>>

The supplied addresses that some book of the scope holds; the rest are absent.

Remarks

The question is whether the user knows the address at all, so it answers with the addresses rather than with whoever holds each — and the precedence between two books that both hold one does not arise, because being held in either is the whole of the answer.

Exceptions

ArgumentNullException

Thrown when a required argument is null.

ArgumentOutOfRangeException

Thrown when more addresses are supplied than one contact may hold.