Table of Contents

Class ListDatabasesOperation

Namespace
MongoDB.Driver.Core.Operations
Assembly
MongoDB.Driver.Core.dll

Represents the listDatabases command.

public class ListDatabasesOperation : IReadOperation<IAsyncCursor<BsonDocument>>
Inheritance
ListDatabasesOperation
Implements
Inherited Members
Extension Methods

Constructors

ListDatabasesOperation(MessageEncoderSettings)

Initializes a new instance of the ListDatabasesOperation class.

public ListDatabasesOperation(MessageEncoderSettings messageEncoderSettings)

Parameters

messageEncoderSettings MessageEncoderSettings

The message encoder settings.

Properties

AuthorizedDatabases

Gets or sets the AuthorizedDatabases flag.

public bool? AuthorizedDatabases { get; set; }

Property Value

bool?

The AuthorizedDatabases flag.

Comment

Gets or sets the comment.

public BsonValue Comment { get; set; }

Property Value

BsonValue

The comment.

Filter

Gets or sets the filter.

public BsonDocument Filter { get; set; }

Property Value

BsonDocument

The filter.

MessageEncoderSettings

Gets the message encoder settings.

public MessageEncoderSettings MessageEncoderSettings { get; }

Property Value

MessageEncoderSettings

The message encoder settings.

NameOnly

Gets or sets the NameOnly flag.

public bool? NameOnly { get; set; }

Property Value

bool?

The NameOnly flag.

RetryRequested

Gets or sets whether or not retry was requested.

public bool RetryRequested { get; set; }

Property Value

bool

Whether retry was requested.

Methods

Execute(IReadBinding, CancellationToken)

Executes the operation.

public IAsyncCursor<BsonDocument> Execute(IReadBinding binding, CancellationToken cancellationToken)

Parameters

binding IReadBinding

The binding.

cancellationToken CancellationToken

The cancellation token.

Returns

IAsyncCursor<BsonDocument>

The result of the operation.

ExecuteAsync(IReadBinding, CancellationToken)

Executes the operation.

public Task<IAsyncCursor<BsonDocument>> ExecuteAsync(IReadBinding binding, CancellationToken cancellationToken)

Parameters

binding IReadBinding

The binding.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<IAsyncCursor<BsonDocument>>

A Task whose result is the result of the operation.