API version:
Show / Hide Table of Contents

Class CollectionClient<T>

A collection of Resource that can be enumerated asynchronously.

Inheritance
System.Object
CollectionClient<T>
Implements
ICollectionClient<T>
System.Collections.Generic.IAsyncEnumerable<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 sealed class CollectionClient<T> : ICollectionClient<T>, IAsyncEnumerable<T> where T : IResource
Type Parameters
Name Description
T

The Resource type in the collection.

Remarks

Using this object with LINQ will automatically enumerate a paginated Okta collection. See the API documentation on pagination.

Constructors

CollectionClient(IDataStore, HttpRequest, RequestContext)

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

Declaration
public CollectionClient(IDataStore dataStore, HttpRequest initialRequest, RequestContext requestContext)
Parameters
Type Name Description
IDataStore dataStore

The IDataStore.

HttpRequest initialRequest

The initial HTTP request options.

RequestContext requestContext

The request context.

Methods

GetAsyncEnumerator(CancellationToken)

Declaration
public IAsyncEnumerator<T> GetAsyncEnumerator(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Collections.Generic.IAsyncEnumerator<T>

GetPagedEnumerator(CancellationToken)

Returns an enumerator that can be used to retrieve items from an Okta collection page-by-page. Use this only if you need to enumerate collections manually; otherwise, use LINQ.

Declaration
public IPagedCollectionEnumerator<T> GetPagedEnumerator(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
IPagedCollectionEnumerator<T>

An enumerator that retrieves items from an Okta collection page-by-page.

Remarks

/// See the API documentation on pagination.

Implements

ICollectionClient<T>
System.Collections.Generic.IAsyncEnumerable<T>
Back to top Copyright © 2021 Okta, Inc.
Generated with DocFx.