Share via


AsyncCollectionResult<T> Class

Definition

Represents a collection of values returned from a cloud service operation. The collection values may be delivered over one or more service responses.

public abstract class AsyncCollectionResult<T> : System.ClientModel.Primitives.AsyncCollectionResult, System.Collections.Generic.IAsyncEnumerable<T>
type AsyncCollectionResult<'T> = class
    inherit AsyncCollectionResult
    interface IAsyncEnumerable<'T>
Public MustInherit Class AsyncCollectionResult(Of T)
Inherits AsyncCollectionResult
Implements IAsyncEnumerable(Of T)

Type Parameters

T
Inheritance
AsyncCollectionResult<T>
Implements

Constructors

Name Description
AsyncCollectionResult<T>()

Creates a new instance of AsyncCollectionResult<T>.

Methods

Name Description
GetAsyncEnumerator(CancellationToken)

Returns an enumerator that iterates asynchronously through the collection.

GetContinuationToken(ClientResult)

Gets a ContinuationToken that can be passed to a client method to obtain a collection holding the items remaining in this AsyncCollectionResult.

(Inherited from AsyncCollectionResult)
GetRawPagesAsync()

Gets the collection of page responses that contain the items in this collection.

(Inherited from AsyncCollectionResult)
GetValuesFromPageAsync(ClientResult)

Gets a collection of the values returned in a page response.

Extension Methods

Name Description
ChunkByKey<TSource,TKey>(IAsyncEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>, CancellationToken)

Chunks the async enumerable sequence into groups based on a key selector function.

ChunkOnChange<TSource>(IAsyncEnumerable<TSource>, Func<TSource,TSource,Boolean>, CancellationToken)

Chunks the async enumerable sequence into groups based on when consecutive elements change.

Peek<T>(IAsyncEnumerable<T>, CancellationToken)

Peeks at the first element of an async enumerable sequence without consuming the sequence.

ToSseResult<T>(IAsyncEnumerable<T>, Func<T,SseFrame>, ILogger, CancellationToken, Nullable<TimeSpan>)

Converts an async enumerable source to an SSE result with frame transformation.

Applies to