Class EmailMarkSelection
- Namespace
- MailFathom.Application.Emails.Mailboxes
- Assembly
- MailFathom.Application.dll
Selects mail by a reading a derivation already made about it, rather than by anything the message itself carries.
public sealed record EmailMarkSelection : IEquatable<EmailMarkSelection>
- Inheritance
-
EmailMarkSelection
- Implements
- Inherited Members
Remarks
It reads what an enrichment pass stored and derives nothing: a caller asks for mail carrying a mark of one aspect, or a mark whose commitment falls due inside a range, and the answer is whichever mail already has one. A deployment that never enriched anything therefore answers with no mail rather than with a refusal, which is the honest reading of "the mail somebody has said this about".
Every criterion stated here is met by one mark. A message carrying an undated commitment and a separate commitment due tomorrow matches a range naming tomorrow because of the second mark; a message whose only commitment is undated matches nothing. Spreading the criteria across two marks would answer "carries a commitment, and separately has something due this week", which is a different question that no reader could tell from this one by looking at the result.
The due bounds select dated commitments alone. A commitment that named no date compares to neither bound, exactly as an undated email compares to neither bound of a received range, and for the same reason: it is not known to fall inside the span the caller asked about.
Properties
- CanonicalText
Gets the injective text of every criterion, which the selection wrapping this one writes into its own.
- DueOnOrAfter
Gets the inclusive start of the range the commitment falls due in, in UTC, or null for no start.
Methods
- Create(EmailEnrichmentAspect?, DateTimeOffset?, DateTimeOffset?)
Validates and normalizes what a request asked of the readings a message carries.