Table of Contents

Class CountOperation

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

Represents a count operation.

public class CountOperation : IReadOperation<long>, IExecutableInRetryableReadContext<long>
Inheritance
CountOperation
Implements
Inherited Members
Extension Methods

Constructors

CountOperation(CollectionNamespace, MessageEncoderSettings)

Initializes a new instance of the CountOperation class.

Properties

Collation

Gets or sets the collation.

CollectionNamespace

Gets the collection namespace.

Comment

Gets or sets the comment.

Filter

Gets or sets the filter.

Hint

Gets or sets the index hint.

Limit

Gets or sets a limit on the number of matching documents to count.

MaxTime

Gets or sets the maximum time the server should spend on this operation.

MessageEncoderSettings

Gets the message encoder settings.

ReadConcern

Gets or sets the read concern.

RetryRequested

Gets or sets a value indicating whether to retry.

Skip

Gets or sets the number of documents to skip before counting the remaining matching documents.

Methods

Execute(IReadBinding, CancellationToken)

Executes the operation.

Execute(RetryableReadContext, CancellationToken)

Executes the first attempt.

ExecuteAsync(IReadBinding, CancellationToken)

Executes the operation.

ExecuteAsync(RetryableReadContext, CancellationToken)

Executes the first attempt.