Method Ordered
- Namespace
- MailFathom.Domain.Reminders
- Assembly
- MailFathom.Domain.dll
Ordered(IReadOnlyCollection<Reminder>)
Puts a stated set of leads into the order reminders are kept in, refusing a set nothing may hold.
public static IReadOnlyList<Reminder> Ordered(IReadOnlyCollection<Reminder> reminders)
Parameters
remindersIReadOnlyCollection<Reminder>The leads as stated, in any order.
Returns
- IReadOnlyList<Reminder>
The leads, longest first.
Remarks
Longest lead first, because that is the order a person reads their own reminders in — the earliest warning is the one furthest from the thing. The order belongs to the record rather than to the writer so that two writers stating the same leads produce the same record, and a repeated lead is refused rather than folded away: it is a caller stating one reminder twice, and answering as though it had asked for one would hide the mistake.
Exceptions
- ArgumentNullException
Thrown when
remindersis null.- ArgumentOutOfRangeException
Thrown when more than MaximumCount leads are supplied.
- ArgumentException
Thrown when one lead is supplied twice.