Method ListDatabaseNamesAsync
ListDatabaseNamesAsync(CancellationToken)
Returns the names of the databases on the server.
public virtual Task<IAsyncCursor<string>> ListDatabaseNamesAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IAsyncCursor<string>>
The database names.
ListDatabaseNamesAsync(ListDatabaseNamesOptions, CancellationToken)
Returns the names of the databases on the server.
public virtual Task<IAsyncCursor<string>> ListDatabaseNamesAsync(ListDatabaseNamesOptions options, CancellationToken cancellationToken = default)
Parameters
options
ListDatabaseNamesOptionsThe options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IAsyncCursor<string>>
The database names.
ListDatabaseNamesAsync(IClientSessionHandle, CancellationToken)
Returns the names of the databases on the server.
public virtual Task<IAsyncCursor<string>> ListDatabaseNamesAsync(IClientSessionHandle session, CancellationToken cancellationToken = default)
Parameters
session
IClientSessionHandleThe session.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IAsyncCursor<string>>
The database names.
ListDatabaseNamesAsync(IClientSessionHandle, ListDatabaseNamesOptions, CancellationToken)
Returns the names of the databases on the server.
public virtual Task<IAsyncCursor<string>> ListDatabaseNamesAsync(IClientSessionHandle session, ListDatabaseNamesOptions options, CancellationToken cancellationToken = default)
Parameters
session
IClientSessionHandleThe session.
options
ListDatabaseNamesOptionsThe options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IAsyncCursor<string>>
The database names.