Method ListCollections
ListCollections(ListCollectionsOptions, CancellationToken)
Lists all the collections in the database.
public virtual IAsyncCursor<BsonDocument> ListCollections(ListCollectionsOptions options = null, CancellationToken cancellationToken = default)
Parameters
options
ListCollections Options The options.
cancellationToken
CancellationToken The cancellation token.
Returns
- IAsync
Cursor <BsonDocument > A cursor.
ListCollections(IClientSessionHandle, ListCollectionsOptions, CancellationToken)
Lists all the collections in the database.
public virtual IAsyncCursor<BsonDocument> ListCollections(IClientSessionHandle session, ListCollectionsOptions options = null, CancellationToken cancellationToken = default)
Parameters
session
IClientSession Handle The session.
options
ListCollections Options The options.
cancellationToken
CancellationToken The cancellation token.
Returns
- IAsync
Cursor <BsonDocument > A cursor.