Method Of
- Namespace
- MailFathom.Domain.Mutations.Audit
- Assembly
- MailFathom.Domain.dll
Of(MailboxMutationAuditEntryId, MailboxMutationRecord, MailFolderResolution, DateTimeOffset)
Writes the entry one finished mutation leaves behind.
public static MailboxMutationAuditEntry Of(MailboxMutationAuditEntryId id, MailboxMutationRecord record, MailFolderResolution sourceFolder, DateTimeOffset completedAt)
Parameters
idMailboxMutationAuditEntryIdThe identity the entry is addressed by.
recordMailboxMutationRecordThe mutation record, at the terminal stage it ended in.
sourceFolderMailFolderResolutionThe binding the source occurrence was read under, which supplies its remote path.
completedAtDateTimeOffsetWhen the mutation reached that stage.
Returns
- MailboxMutationAuditEntry
The entry to append to the trail.
Remarks
The terminal stage is required rather than assumed, because an entry written from a mutation still in flight would state an ending that had not happened and no later write corrects it.
Exceptions
- ArgumentNullException
Thrown when
recordorsourceFolderis null.- ArgumentException
Thrown when
recordhas not reached a terminal stage, or whensourceFolderis not the binding the record's occurrence names.