Method RecordAsync
- Namespace
- MailFathom.Application.Contacts
- Assembly
- MailFathom.Application.dll
RecordAsync(ContactRecordDraft, CancellationToken)
Records a person the book does not yet hold.
public Task<ContactWriteResult> RecordAsync(ContactRecordDraft draft, CancellationToken cancellationToken)
Parameters
draftContactRecordDraftThe record to write.
cancellationTokenCancellationTokenCancels the write.
Returns
- Task<ContactWriteResult>
The record as written, or the refusal naming what stopped it.
Exceptions
- ArgumentNullException
Thrown when
draftis null.- PrincipalNotAuthorizedException
Thrown when the caller does not hold the writing grant.
- ContactRecordInvalidException
Thrown when the record breaks a rule the book holds.