Method ListCollectionNamesAsync
ListCollectionNamesAsync(ListCollectionNamesOptions, CancellationToken)
Lists the names of all the collections in the database.
Task<IAsyncCursor<string>> ListCollectionNamesAsync(ListCollectionNamesOptions options = null, CancellationToken cancellationToken = default)
Parameters
options
ListCollectionNamesOptionsThe options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IAsyncCursor<string>>
A Task whose result is a cursor.
ListCollectionNamesAsync(IClientSessionHandle, ListCollectionNamesOptions, CancellationToken)
Lists the names of all the collections in the database.
Task<IAsyncCursor<string>> ListCollectionNamesAsync(IClientSessionHandle session, ListCollectionNamesOptions options = null, CancellationToken cancellationToken = default)
Parameters
session
IClientSessionHandleThe session.
options
ListCollectionNamesOptionsThe options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IAsyncCursor<string>>
A Task whose result is a cursor.