Constructor EmailTimelinePosition
- Namespace
- MailFathom.Domain.Emails
- Assembly
- MailFathom.Domain.dll
EmailTimelinePosition(DateTimeOffset?, StoredEmailId)
Places one stored email in the total order a mailbox timeline is read and paged over.
public EmailTimelinePosition(DateTimeOffset? ReceivedAt, StoredEmailId StoredEmailId)
Parameters
ReceivedAtDateTimeOffset?When the last receiving hop recorded the message, or null when no header carried a usable date.
StoredEmailIdStoredEmailIdThe stable local identity that breaks ties between messages sharing a timestamp.
Remarks
Keyset pagination needs a total order, not merely a sort: two pages are contiguous only when every row falls on exactly one side of the key the previous page ended on. A received timestamp alone is not total, because a mail server can record several messages within the same instant, so the local identity is part of the position rather than a decoration on it.
This type is the single statement of that order. The timeline indexes on stored_emails are configured to
match it column for column, so a query planned against the index returns rows in the order
NewestFirst describes rather than in one that merely resembles it.