Class EstimatedDocumentCountOperation
- Namespace
- MongoDB.Driver.Core.Operations
- Assembly
- MongoDB.Driver.Core.dll
Represents an estimated document count operation.
public class EstimatedDocumentCountOperation : IReadOperation<long>
- Inheritance
-
EstimatedDocumentCountOperation
- Implements
- Inherited Members
- Extension Methods
Constructors
EstimatedDocumentCountOperation(CollectionNamespace, MessageEncoderSettings)
Initializes a new instance of the EstimatedDocumentCountOperation class.
public EstimatedDocumentCountOperation(CollectionNamespace collectionNamespace, MessageEncoderSettings messageEncoderSettings)
Parameters
collectionNamespace
CollectionNamespaceThe collection namespace.
messageEncoderSettings
MessageEncoderSettingsThe message encoder settings.
Properties
CollectionNamespace
Gets the collection namespace.
public CollectionNamespace CollectionNamespace { get; }
Property Value
Comment
Gets or sets the comment.
public BsonValue Comment { get; set; }
Property Value
MaxTime
Gets or sets the maximum time the server should spend on this operation.
public TimeSpan? MaxTime { get; set; }
Property Value
MessageEncoderSettings
Gets the message encoder settings.
public MessageEncoderSettings MessageEncoderSettings { get; }
Property Value
ReadConcern
Gets or sets the read concern.
public ReadConcern ReadConcern { get; set; }
Property Value
RetryRequested
Gets or sets a value indicating whether to retry.
public bool RetryRequested { get; set; }
Property Value
Methods
Execute(IReadBinding, CancellationToken)
Executes the operation.
public long Execute(IReadBinding binding, CancellationToken cancellationToken)
Parameters
binding
IReadBindingThe binding.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- long
The result of the operation.
ExecuteAsync(IReadBinding, CancellationToken)
Executes the operation.
public Task<long> ExecuteAsync(IReadBinding binding, CancellationToken cancellationToken)
Parameters
binding
IReadBindingThe binding.
cancellationToken
CancellationTokenThe cancellation token.