Table of Contents

Method ReleaseAsync

Namespace
MailFathom.Application.Mail.Mutations
Assembly
MailFathom.Application.dll

ReleaseAsync(IPersistenceSession, IReadOnlyList<MailAccountId>, IReadOnlyList<MailboxMutationRecordId>, CancellationToken)

Lifts the hold on the changes among those named on the caller's own accounts, so the next convergence pass may take each in hand.

Task<IReadOnlyList<MailboxMutationRecord>> ReleaseAsync(IPersistenceSession session, IReadOnlyList<MailAccountId> accounts, IReadOnlyList<MailboxMutationRecordId> recordIds, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session the write joins.

accounts IReadOnlyList<MailAccountId>

The accounts the caller is assigned, which are the accounts the records must belong to.

recordIds IReadOnlyList<MailboxMutationRecordId>

The records to release.

cancellationToken CancellationToken

Cancels the write.

Returns

Task<IReadOnlyList<MailboxMutationRecord>>

Each named record as it now stands, unchanged where nothing was holding it, and absent where those accounts hold no such record.

Remarks

It is the opposite half of WithdrawAsync(IPersistenceSession, IReadOnlyList<MailAccountId>, IReadOnlyList<MailboxMutationRecordId>, CancellationToken) and is shaped like it for the same reasons: a record nothing was holding is reported where it stands rather than refused, which is what makes the call safe to repeat, and the whole set is taken in one commit because a caller that submitted a batch releases it as one. Releasing changes no stage, so a record already withdrawn stays withdrawn and one already under way is untouched — what it removes is a wait, never a decision.

Exceptions

ArgumentNullException

Thrown when session, accounts or recordIds is null.