Method ListDatabasesAsync
ListDatabasesAsync(CancellationToken)
Lists the databases on the server.
public abstract Task<IAsyncCursor<BsonDocument>> ListDatabasesAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationToken The cancellation token.
Returns
- Task<IAsync
Cursor <BsonDocument >> A Task whose result is a cursor.
ListDatabasesAsync(ListDatabasesOptions, CancellationToken)
Lists the databases on the server.
public virtual Task<IAsyncCursor<BsonDocument>> ListDatabasesAsync(ListDatabasesOptions options, CancellationToken cancellationToken = default)
Parameters
options
ListDatabases Options The options.
cancellationToken
CancellationToken The cancellation token.
Returns
- Task<IAsync
Cursor <BsonDocument >> A Task whose result is a cursor.
ListDatabasesAsync(IClientSessionHandle, CancellationToken)
Lists the databases on the server.
public virtual Task<IAsyncCursor<BsonDocument>> ListDatabasesAsync(IClientSessionHandle session, CancellationToken cancellationToken = default)
Parameters
session
IClientSession Handle The session.
cancellationToken
CancellationToken The cancellation token.
Returns
- Task<IAsync
Cursor <BsonDocument >> A Task whose result is a cursor.
ListDatabasesAsync(IClientSessionHandle, ListDatabasesOptions, CancellationToken)
Lists the databases on the server.
public virtual Task<IAsyncCursor<BsonDocument>> ListDatabasesAsync(IClientSessionHandle session, ListDatabasesOptions options, CancellationToken cancellationToken = default)
Parameters
session
IClientSession Handle The session.
options
ListDatabases Options The options.
cancellationToken
CancellationToken The cancellation token.
Returns
- Task<IAsync
Cursor <BsonDocument >> A Task whose result is a cursor.