Table of Contents

Method AmendAsync

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

AmendAsync(ContactAmendment, CancellationToken)

Amends a contact to the record the caller states, if its origin admits that writer.

public Task<ContactWriteResult> AmendAsync(ContactAmendment amendment, CancellationToken cancellationToken)

Parameters

amendment ContactAmendment

The record the contact is to have, and the origin the writer acts under.

cancellationToken CancellationToken

Cancels the write.

Returns

Task<ContactWriteResult>

The amended record, or the refusal naming what stopped it.

Remarks

The grant is asked for before the book is read, so a caller who may not write cannot learn from the refusal whether the book holds the person they named.

Exceptions

ArgumentNullException

Thrown when amendment is null.

ArgumentException

Thrown when the amendment does not form a contact the domain admits.

PersistenceConcurrencyConflictException

Thrown when every allowed attempt lost the race.

PrincipalNotAuthorizedException

Thrown when the write was reached by anything but a caller granted AdminOperate.