Struct MassivePage<T>
- Namespace
- MassiveDotNet
- Assembly
- MassiveDotNet.dll
One page of results from a paginated Massive endpoint.
public readonly record struct MassivePage<T> : IEquatable<MassivePage<T>>
Type Parameters
TThe result item type.
- Implements
- Inherited Members
Remarks
Returned by the List methods of endpoints that paginate. To walk every page instead of
handling cursors yourself, use the matching Enumerate method, which returns an
IAsyncEnumerable<T>.
The cursor itself is deliberately not exposed. It is a server-supplied absolute URL that the SDK validates and follows internally; there is no public API that accepts one back, so surfacing it would offer callers a value they could not use.
Equality is the compiler-synthesized record equality, which compares Results by reference rather than by content: two pages holding equal but distinct arrays are not equal, and a page constructed from null is not equal to one constructed from an empty array even though both expose an empty Results. That is unavoidable for a record holding an array; compare Results directly when the contents are what you mean to compare.
Constructors
MassivePage(T[]?, bool, string?)
Initializes a new instance of the MassivePage<T> struct.
public MassivePage(T[]? results, bool hasMore, string? requestId)
Parameters
resultsT[]The page's results, or null when the server sent none.
hasMoreboolWhether the server offered a cursor to a further page.
requestIdstringThe server-assigned request identifier, when present.
Properties
HasMore
Whether more pages exist. When true, the matching Enumerate method
will retrieve the remainder.
public bool HasMore { get; }
Property Value
RequestId
The server-assigned request identifier. Include this when contacting Massive support.
null when the endpoint does not return one: a few paginated envelopes
declare no request_id at all, so there is nothing to surface for them.
public string? RequestId { get; }
Property Value
Results
The results in this page. Never null; empty when the server returned none.
public T[] Results { get; }
Property Value
- T[]