Table of Contents

Method FindUnmentionedAsync

Namespace
MailFathom.Application.StoredFiles
Assembly
MailFathom.Application.dll

FindUnmentionedAsync(DateTimeOffset, int, CancellationToken)

Finds files written before an instant whose identifier their owner's record does not mention.

Task<IReadOnlyList<HeldStoredFile>> FindUnmentionedAsync(DateTimeOffset writtenBefore, int maxFiles, CancellationToken cancellationToken)

Parameters

writtenBefore DateTimeOffset

The instant a candidate was written before.

maxFiles int

How many candidates to answer at most.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<IReadOnlyList<HeldStoredFile>>

The candidates, oldest first.

Remarks

A mention is a coarser test than a link, and deliberately errs one way: a file whose identifier appears anywhere in the record is left out, so the sweep never spends its bound re-reading files that are linked. Whether a candidate is actually unlinked is decided by the sweep against the links the record declares.

Exceptions

ArgumentOutOfRangeException

Thrown when maxFiles is not positive.