Table of Contents

Struct SpamClassificationHistoryCursor

Namespace
MailFathom.Application.Spam.History
Assembly
MailFathom.Application.dll

Marks where one page of an account's classifications ended, so the next page continues from it.

public readonly record struct SpamClassificationHistoryCursor : IEquatable<SpamClassificationHistoryCursor>
Implements
Inherited Members

Remarks

The reading is ordered newest first by evaluation instant, with the occurrence identifier breaking a tie, and this pairs those two values with a fingerprint of the filters the page was read under. The pair is what makes pagination keyset-based rather than offset-based: a run that classifies mail between two requests neither shifts a window nor causes a message to be skipped or repeated. The fingerprint is what makes the boundary meaningful, because a position names a page edge only within the filtered set it was computed for.

It carries no secret and needs no signature: every value in it is one the caller already supplied or already received. Encoding is about opacity rather than protection — a client that cannot read a cursor does not build one.

Fields

MaximumEncodedLength

The greatest number of characters an encoded cursor may carry before it is refused unread.

Properties

EmailId

Gets the occurrence of that classification, which breaks a tie between two evaluated in one instant.

EvaluatedAt

Gets the evaluation instant of the last classification the page returned.

FilterFingerprint

Gets the fingerprint of the filters this cursor was issued for.

Methods

After(DateTimeOffset, StoredEmailId, string)

Creates the cursor that continues a walk after one position in the reading.

Encode()

Writes the cursor as the opaque string a caller presents to continue the walk.

TryDecode(string?, out SpamClassificationHistoryCursor)

Reads a cursor a caller presented.