Method RecordAsync
- Namespace
- MailFathom.Application.Mail.Delivery.Governance
- Assembly
- MailFathom.Application.dll
RecordAsync(AuthoredSendPermit, AuthoredSendAct, OutgoingEmailRecord, CancellationToken)
Records that the send was asked for, once its record is durable.
public Task RecordAsync(AuthoredSendPermit permit, AuthoredSendAct act, OutgoingEmailRecord record, CancellationToken cancellationToken)
Parameters
permitAuthoredSendPermitWhat RequirePermittedAsync(IReadOnlyList<AuthoredEmailRecipient>, OutgoingEmailRequest, CancellationToken) admitted the send as.
actAuthoredSendActWhat the caller asked for.
recordOutgoingEmailRecordThe durable record the message was written down as.
cancellationTokenCancellationTokenCancels writing the audit record.
Returns
- Task
A task that completes once the send is recorded.
Remarks
It follows the write because a record is what the audit is about: an owner reading it back asks what was sent and under whose grant, which is answerable only once the send has an identity. The caller was charged where it was admitted, so nothing here decides whether the period has room.
Exceptions
- ArgumentNullException
Thrown when
permitorrecordis null.