Table of Contents

Method ListDatabases

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

ListDatabases(CancellationToken)

Lists the databases on the server.

public override sealed IAsyncCursor<BsonDocument> ListDatabases(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

The cancellation token.

Returns

IAsyncCursor<BsonDocument>

A cursor.

ListDatabases(ListDatabasesOptions, CancellationToken)

Lists the databases on the server.

public override sealed IAsyncCursor<BsonDocument> ListDatabases(ListDatabasesOptions options, CancellationToken cancellationToken = default)

Parameters

options ListDatabasesOptions

The options.

cancellationToken CancellationToken

The cancellation token.

Returns

IAsyncCursor<BsonDocument>

A cursor.

ListDatabases(IClientSessionHandle, CancellationToken)

Lists the databases on the server.

public override sealed IAsyncCursor<BsonDocument> ListDatabases(IClientSessionHandle session, CancellationToken cancellationToken = default)

Parameters

session IClientSessionHandle

The session.

cancellationToken CancellationToken

The cancellation token.

Returns

IAsyncCursor<BsonDocument>

A cursor.

ListDatabases(IClientSessionHandle, ListDatabasesOptions, CancellationToken)

Lists the databases on the server.

public override sealed IAsyncCursor<BsonDocument> ListDatabases(IClientSessionHandle session, ListDatabasesOptions options, CancellationToken cancellationToken = default)

Parameters

session IClientSessionHandle

The session.

options ListDatabasesOptions

The options.

cancellationToken CancellationToken

The cancellation token.

Returns

IAsyncCursor<BsonDocument>

A cursor.