API version:
Show / Hide Table of Contents

Class PagedCollectionEnumerator<T>

Enumerates an Okta collection by retrieving pages of results.

Inheritance
System.Object
PagedCollectionEnumerator<T>
Implements
IPagedCollectionEnumerator<T>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Okta.Sdk
Assembly: Okta.Sdk.dll
Syntax
public class PagedCollectionEnumerator<T> : IPagedCollectionEnumerator<T> where T : IResource
Type Parameters
Name Description
T

The type of items in the collection.

Remarks

See the API documentation on pagination.

Constructors

PagedCollectionEnumerator(IDataStore, HttpRequest, RequestContext, CancellationToken)

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

Declaration
public PagedCollectionEnumerator(IDataStore dataStore, HttpRequest initialRequest, RequestContext requestContext, CancellationToken cancellationToken)
Parameters
Type Name Description
IDataStore dataStore

The IDataStore to use.

HttpRequest initialRequest

The initial HTTP request options.

RequestContext requestContext

The request context.

System.Threading.CancellationToken cancellationToken

The rcancellation token.

Properties

CurrentPage

Gets the current page of items, or null if MoveNextAsync() has not yet been called.

Declaration
public CollectionPage<T> CurrentPage { get; }
Property Value
Type Description
CollectionPage<T>

The current page of items, if any.

Methods

MoveNextAsync()

Asynchronously retrieves the next page of results and updates CurrentPage. If there are no more pages, this method returns false.

Declaration
public Task<bool> MoveNextAsync()
Returns
Type Description
System.Threading.Tasks.Task<System.Boolean>

true if CurrentPage has been updated with new items, false if the collection has been exhausted.

Implements

IPagedCollectionEnumerator<T>
Back to top Copyright © 2021 Okta, Inc.
Generated with DocFx.