Table of Contents

Method FindDueForExpiryAsync

Namespace
MailFathom.Application.Mail.Export
Assembly
MailFathom.Application.dll

FindDueForExpiryAsync(DateTimeOffset, int, CancellationToken)

Names the completed exports whose retention period has run out.

Task<IReadOnlyList<MailboxExport>> FindDueForExpiryAsync(DateTimeOffset asOf, int limit, CancellationToken cancellationToken)

Parameters

asOf DateTimeOffset

The instant expiry is judged against.

limit int

How many to name at most, which bounds one pass.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<IReadOnlyList<MailboxExport>>

The exports whose archives are due to be deleted.

Remarks

Read from the recorded expiry rather than from a timer held in one process, which is what makes expiry survive a restart and a replica ending.

Exceptions

ArgumentOutOfRangeException

Thrown when limit is not positive.