Table of Contents

Method HoldsAddressAsync

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

HoldsAddressAsync(EmailAddress, CancellationToken)

Answers whether the book already holds one address, without answering whose it is.

public Task<bool> HoldsAddressAsync(EmailAddress address, CancellationToken cancellationToken)

Parameters

address EmailAddress

The address to look for, matched on its comparison form.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<bool>

true when some contact holds it, whichever origin that contact has.

Remarks

The read collection performs before it decides whether to record somebody, and it answers a question rather than producing a record deliberately: collection needs to know that an address is spoken for, and handing it the contact would put a person the owner asserted into the hands of work that may not touch them. It admits the process identity alone, for the reason CollectAsync(NewContact, CancellationToken) does.

Exceptions

PrincipalNotAuthorizedException

Thrown when the read was reached by anything but MailFathom's own identity.