Show / Hide Table of Contents

Class Page<TResource>

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

Inheritance
System.Object
Page<TResource>
Implements
System.Collections.Generic.IEnumerable<TResource>
System.Collections.IEnumerable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Api.Gax
Assembly: Google.Api.Gax.dll
Syntax
public sealed class Page<TResource> : IEnumerable<TResource>, IEnumerable
Type Parameters
Name Description
TResource

The type of resource within the page.

Constructors

Page(IEnumerable<TResource>, String)

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

Declaration
public Page(IEnumerable<TResource> resources, string nextPageToken)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<TResource> resources

The resources in the page.

System.String nextPageToken

The next page token.

Properties

NextPageToken

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

Declaration
public string NextPageToken { get; }
Property Value
Type Description
System.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()

Declaration
public IEnumerator<TResource> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<TResource>
Implements
System.Collections.Generic.IEnumerable<T>.GetEnumerator()

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator
Implements
System.Collections.IEnumerable.GetEnumerator()
Back to top