Class ListCollectionsOperation
- Namespace
- MongoDB.Driver.Core.Operations
- Assembly
- MongoDB.Driver.Core.dll
Represents a list collections operation.
public class ListCollectionsOperation : IReadOperation<IAsyncCursor<BsonDocument>>, IExecutableInRetryableReadContext<IAsyncCursor<BsonDocument>>
- Inheritance
-
ListCollectionsOperation
- Implements
- Inherited Members
- Extension Methods
Constructors
ListCollectionsOperation(DatabaseNamespace, MessageEncoderSettings)
Initializes a new instance of the ListCollectionsOperation class.
public ListCollectionsOperation(DatabaseNamespace databaseNamespace, MessageEncoderSettings messageEncoderSettings)
Parameters
databaseNamespace
DatabaseNamespaceThe database namespace.
messageEncoderSettings
MessageEncoderSettingsThe message encoder settings.
Properties
AuthorizedCollections
Gets or sets the AuthorizedCollections flag.
public bool? AuthorizedCollections { get; set; }
Property Value
- bool?
Whether authorizedCollections flag is set.
BatchSize
Gets or sets the batch size.
public int? BatchSize { get; set; }
Property Value
- int?
The batch size.
Comment
Gets or sets the comment.
public BsonValue Comment { get; set; }
Property Value
DatabaseNamespace
Gets the database namespace.
public DatabaseNamespace DatabaseNamespace { get; }
Property Value
- DatabaseNamespace
The database namespace.
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 name only option.
public bool? NameOnly { get; set; }
Property Value
- bool?
The name only option.
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
IReadBindingThe binding.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- IAsyncCursor<BsonDocument>
The result of the operation.
Execute(RetryableReadContext, CancellationToken)
Executes the first attempt.
public IAsyncCursor<BsonDocument> Execute(RetryableReadContext context, CancellationToken cancellationToken)
Parameters
context
RetryableReadContextThe context.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- IAsyncCursor<BsonDocument>
The result.
ExecuteAsync(IReadBinding, CancellationToken)
Executes the operation.
public Task<IAsyncCursor<BsonDocument>> ExecuteAsync(IReadBinding binding, CancellationToken cancellationToken)
Parameters
binding
IReadBindingThe binding.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IAsyncCursor<BsonDocument>>
A Task whose result is the result of the operation.
ExecuteAsync(RetryableReadContext, CancellationToken)
Executes the first attempt.
public Task<IAsyncCursor<BsonDocument>> ExecuteAsync(RetryableReadContext context, CancellationToken cancellationToken)
Parameters
context
RetryableReadContextThe context.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IAsyncCursor<BsonDocument>>
The result.