Struct Reminder
- Namespace
- MailFathom.Domain.Reminders
- Assembly
- MailFathom.Domain.dll
States how long before something a person is to be reminded of it.
public readonly record struct Reminder : IEquatable<Reminder>
- Implements
- Inherited Members
Remarks
A lead rather than an instant, which is what makes a reminder survive the thing it is about moving: what a person chose is a quarter of an hour beforehand, and the instant that falls at is derived from that thing every time it is asked for. The derivation lives on whatever carries the reminder, because the anchor an all-day event or a task's due date is measured back from is that record's own affair rather than the lead's.
It is shared by every kind of thing that carries reminders rather than restated per kind. What a lead is — its unit, its bounds, and what zero means — is one rule, and a second copy of it under another name is the way a calendar and a task list come to disagree about what somebody set.
Zero is a lead like any other and means the moment the thing falls at. It is not the absence of a reminder: something nobody wants to be told about carries no reminder at all.
The lead is whole minutes because that is the coarsest unit the client offers and the finest anything here acts on: a run looking for what has come due cannot be more precise than the interval it runs on, and a reminder stated in seconds would promise a precision no producer keeps.
Fields
- MaximumCount
The most reminders one thing may carry.
- MaximumMinutesBefore
The longest lead a reminder may state, which is four weeks.
Properties
- Lead
Gets how long before the thing this reminder falls.
- MinutesBefore
Gets how many minutes before the thing this reminder falls, which is zero at the thing itself.
Methods
- Create(int)
Creates a reminder from the lead a person stated.
- IsStatable(int)
Reports whether a stated lead is one a reminder can be created from.
- Ordered(IReadOnlyCollection<Reminder>)
Puts a stated set of leads into the order reminders are kept in, refusing a set nothing may hold.
- ToString()
Returns the fully qualified type name of this instance.