PagedEnumerableExtensions.ToListAsync<T> Method

Definition

Creates a List<T> from an IPagedEnumerable<T>.

C#
public static System.Threading.Tasks.Task<System.Collections.Generic.List<T>> ToListAsync<T>(this Microsoft.Azure.Batch.IPagedEnumerable<T> source, System.Threading.CancellationToken cancellationToken = default);

Type Parameters

T

Parameters

source
IPagedEnumerable<T>

The IPagedEnumerable<T> to create a list from.

cancellationToken
CancellationToken

A CancellationToken for controlling the lifetime of the asynchronous operation.

Returns

Task<List<T>>

A Task<TResult> that represents the asynchronous operation. The result of the task is a List<T> containing all elements of the source sequence.

Applies to

Product Versions
Azure SDK for .NET Latest