Table of Contents

Method ToAsyncEnumerable

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

ToAsyncEnumerable<TDocument>(IAsyncCursor<TDocument>)

Wraps a cursor in an IAsyncEnumerable that can be enumerated one time.

public static IAsyncEnumerable<TDocument> ToAsyncEnumerable<TDocument>(this IAsyncCursor<TDocument> cursor)

Parameters

cursor IAsyncCursor<TDocument>

The cursor.

Returns

IAsyncEnumerable<TDocument>

An IAsyncEnumerable.

Type Parameters

TDocument

The type of the document.