Table of Contents

Class ContactCursor

Namespace
MailFathom.Application.Contacts
Assembly
MailFathom.Application.dll

Names the contact a continued walk of the book reads beyond.

public sealed record ContactCursor : IEquatable<ContactCursor>
Inheritance
ContactCursor
Implements
Inherited Members

Remarks

The pair is exactly what the listing is ordered by, so a contact whose name sorts identically to the last one of the previous page is served once rather than skipped or repeated. The comparison form is carried rather than the name as written, because that is what the order is taken on and what the index is built over.

The ordering is total and the same under every filter, so a cursor issued while listing one origin still names a valid boundary when the walk is continued over all of them. That is why nothing here binds a cursor to the filters it was issued under: no combination of them makes reusing one skip a contact or serve one twice. What can is a rename, which moves a contact within the order the cursor was cut from, exactly as ContactQuery states — the boundary is a position in the order rather than a snapshot of it.

Fields

MaximumEncodedLength

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

Properties

ContactId

Gets the last served contact, which settles the order between contacts whose names compare equal.

DisplayNameSortKey

Gets the comparison form of the last served contact's name.

Methods

After(ContactDisplayName, ContactId)

Names the boundary after one served contact.

Encode()

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

TryDecode(string?, out ContactCursor?)

Reads a cursor a caller presented.