MongoClient.ListDatabasesAsync Method (ListDatabasesOptions, CancellationToken) |
Lists the databases on the server.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.19.1+3a2a09dd959482f665ffbb5df2557ec541597af4
Syntax public override sealed Task<IAsyncCursor<BsonDocument>> ListDatabasesAsync(
ListDatabasesOptions options,
CancellationToken cancellationToken = default
)
Public Overrides NotOverridable Function ListDatabasesAsync (
options As ListDatabasesOptions,
Optional cancellationToken As CancellationToken = Nothing
) As Task(Of IAsyncCursor(Of BsonDocument))
abstract ListDatabasesAsync :
options : ListDatabasesOptions *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> Task<IAsyncCursor<BsonDocument>>
override ListDatabasesAsync :
options : ListDatabasesOptions *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> Task<IAsyncCursor<BsonDocument>>
Parameters
- options
- Type: MongoDB.Driver.ListDatabasesOptions
The options. - cancellationToken (Optional)
- Type: System.Threading.CancellationToken
The cancellation token.
Return Value
Type:
Task<IAsyncCursor<BsonDocument>>A Task whose result is a cursor.
Implements
IMongoClient.ListDatabasesAsync(ListDatabasesOptions, CancellationToken)See Also