AsyncEnumerable.ToAsyncEnumerable<TSource> Метод

Определение

Преобразует IEnumerable<T> в IAsyncEnumerable<T>.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TSource> ^ ToAsyncEnumerable(System::Collections::Generic::IEnumerable<TSource> ^ source);
public static System.Collections.Generic.IAsyncEnumerable<TSource> ToAsyncEnumerable<TSource>(this System.Collections.Generic.IEnumerable<TSource> source);
static member ToAsyncEnumerable : seq<'Source> -> System.Collections.Generic.IAsyncEnumerable<'Source>
<Extension()>
Public Function ToAsyncEnumerable(Of TSource) (source As IEnumerable(Of TSource)) As IAsyncEnumerable(Of TSource)

Параметры типа

TSource

Тип элементов источника.

Параметры

source
IEnumerable<TSource>

Список IEnumerable<T> элементов для перечисления.

Возвращаемое значение

IAsyncEnumerable<TSource>

Содержит IAsyncEnumerable<T> последовательность элементов из source.

Исключения

source равно null.

Комментарии

Если source он уже реализует IAsyncEnumerable<T>, он возвращается напрямую. В противном случае каждая итерация через результирующую IAsyncEnumerable<T> итерацию будет проходить через source.

Применяется к