Method PromoteAsync
- Namespace
- MailFathom.Application.Contacts
- Assembly
- MailFathom.Application.dll
PromoteAsync(ContactId, CancellationToken)
Takes on a contact this deployment collected, so it becomes one the owner asserted.
public Task<ContactWriteResult> PromoteAsync(ContactId contactId, CancellationToken cancellationToken)
Parameters
contactIdContactIdThe contact to promote.
cancellationTokenCancellationTokenCancels the write.
Returns
- Task<ContactWriteResult>
The promoted record, or the refusal naming what stopped it.
Remarks
The act that turns a record nobody wrote down into one somebody did, and the only crossing between the origins. It is what unlocks amending a collected contact: a caller refused an amendment is told the record was collected, promotes it, and then amends it like any other. It acts under MailFathom.Application.Contacts.ContactBookWriter.CallerWriter for the same reason every other write here does — a caller granted this permission is writing for the owner — which is also what keeps collection from performing it on its own output.
Exceptions
- PrincipalNotAuthorizedException
Thrown when the caller does not hold the writing grant.