Table of Contents

Method ReadDueAsync

Namespace
MailFathom.Application.Reminders
Assembly
MailFathom.Application.dll

ReadDueAsync(DateTimeOffset, DateTimeOffset, int, CancellationToken)

Reads the reminders that have come due and have not been announced at the instant they now fall at.

Task<IReadOnlyList<DueReminder>> ReadDueAsync(DateTimeOffset asOf, DateTimeOffset notDueBefore, int limit, CancellationToken cancellationToken)

Parameters

asOf DateTimeOffset

The instant a reminder must have fallen at or before to be due.

notDueBefore DateTimeOffset

The instant a reminder must have fallen at or after to still be worth announcing.

limit int

The greatest number of reminders one pass may read.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<IReadOnlyList<DueReminder>>

The reminders, earliest first, and never more than limit.

Remarks

The lower bound is what keeps a deployment that was off for a day from announcing that day's reminders the moment it comes back: a reminder nobody could have acted on is left where it is rather than delivered late in a burst, and the thing it was about has already happened.

Exceptions

ArgumentOutOfRangeException

Thrown when limit is not positive.