<PackageReference Include="Azure.Core" Version="1.47.2" />

Pageable<T>

public abstract class Pageable<T> : IEnumerable<T>, IEnumerable
A collection of values that may take multiple service requests to iterate over.
protected virtual CancellationToken CancellationToken { get; }

Gets a CancellationToken used for requests made while enumerating asynchronously.

protected Pageable()

Initializes a new instance of the Pageable<T> class for mocking.

protected Pageable(CancellationToken cancellationToken)

Initializes a new instance of the Pageable<T> class.

public static Pageable<T> FromPages(IEnumerable<Page<T>> pages)

Creates an instance of Pageable<T> using the provided pages.

public abstract IEnumerable<Page<T>> AsPages(string continuationToken = null, int? pageSizeHint = default)

Enumerate the values a Page<T> at a time. This may make multiple service requests.

public virtual IEnumerator<T> GetEnumerator()

Enumerate the values in the collection. This may make multiple service requests.