Table of Contents

Method ListDatabaseNames

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

ListDatabaseNames(CancellationToken)

Returns the names of the databases on the server.

IAsyncCursor<string> ListDatabaseNames(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

The cancellation token.

Returns

IAsyncCursor<string>

The database names.

ListDatabaseNames(ListDatabaseNamesOptions, CancellationToken)

Returns the names of the databases on the server.

IAsyncCursor<string> ListDatabaseNames(ListDatabaseNamesOptions options, CancellationToken cancellationToken = default)

Parameters

options ListDatabaseNamesOptions

The options.

cancellationToken CancellationToken

The cancellation token.

Returns

IAsyncCursor<string>

The database names.

ListDatabaseNames(IClientSessionHandle, CancellationToken)

Returns the names of the databases on the server.

IAsyncCursor<string> ListDatabaseNames(IClientSessionHandle session, CancellationToken cancellationToken = default)

Parameters

session IClientSessionHandle

The session.

cancellationToken CancellationToken

The cancellation token.

Returns

IAsyncCursor<string>

The database names.

ListDatabaseNames(IClientSessionHandle, ListDatabaseNamesOptions, CancellationToken)

Returns the names of the databases on the server.

IAsyncCursor<string> ListDatabaseNames(IClientSessionHandle session, ListDatabaseNamesOptions options, CancellationToken cancellationToken = default)

Parameters

session IClientSessionHandle

The session.

options ListDatabaseNamesOptions

The options.

cancellationToken CancellationToken

The cancellation token.

Returns

IAsyncCursor<string>

The database names.