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
writtenBeforeDateTimeOffsetThe instant a candidate was written before.
maxFilesintHow many candidates to answer at most.
cancellationTokenCancellationTokenCancels 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
maxFilesis not positive.