Class Page<TResource> (4.4.0)

public sealed class Page<TResource> : IEnumerable<TResource>, IEnumerable

A page of resources which will only have fewer results than requested if there is no more data to fetch.

Inheritance

object > Page<TResource>

Implements

IEnumerable, IEnumerable

Namespace

Google.Api.Gax

Assembly

Google.Api.Gax.dll

Type Parameter

NameDescription
TResource

The type of resource within the page.

Constructors

Page(IEnumerable<TResource>, string)

public Page(IEnumerable<TResource> resources, string nextPageToken)

Constructs a fixed-size page from the given resource sequence and page token.

Parameters
NameDescription
resourcesIEnumerable

The resources in the page.

nextPageTokenstring

The next page token.

Properties

NextPageToken

public string NextPageToken { get; }

The page token to use to fetch the next set of resources.

Property Value
TypeDescription
string
Remarks

gRPC-based APIs use an empty string as a "no page token", whereas REST-based APIs use a null reference instead. The value here will be consistent with the value returned by the API itself.

Methods

GetEnumerator()

public IEnumerator<TResource> GetEnumerator()
Returns
TypeDescription
IEnumerator