Table of Contents

Method RecordTransmissionBegunAsync

Namespace
MailFathom.Application.Mail.Delivery
Assembly
MailFathom.Application.dll

RecordTransmissionBegunAsync(IPersistenceSession, OutgoingEmailLease, OutgoingEmailId, CancellationToken)

Moves the record to TransmissionBegun.

Task RecordTransmissionBegunAsync(IPersistenceSession session, OutgoingEmailLease lease, OutgoingEmailId outgoingEmailId, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session the write joins.

lease OutgoingEmailLease

The lease the attempt holds the record under.

outgoingEmailId OutgoingEmailId

The record to advance.

cancellationToken CancellationToken

Cancels the write.

Returns

Task

A task that completes when the stage is written.

Remarks

It is a transition of its own rather than a value passed to AdvanceAsync(IPersistenceSession, OutgoingEmailLease, OutgoingEmailId, OutgoingEmailStage, int?, CancellationToken), because it is the one that has to be durable before the act it describes. Announcing it afterwards would be announcing it only when the crash it exists for did not happen.

Exceptions

ArgumentNullException

Thrown when session or lease is null.

OutgoingEmailLeaseLostException

Thrown when the record is held by a later attempt.

InvalidOperationException

Thrown when no record carries outgoingEmailId, or when it is not at Recorded.