Method ListDatabasesAsync
ListDatabasesAsync(CancellationToken)
Lists the databases on the server.
public abstract Task<IAsyncCursor<BsonDocument>> ListDatabasesAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IAsyncCursor<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
ListDatabasesOptionsThe options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IAsyncCursor<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
IClientSessionHandleThe session.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IAsyncCursor<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
IClientSessionHandleThe session.
options
ListDatabasesOptionsThe options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IAsyncCursor<BsonDocument>>
A Task whose result is a cursor.