Table of Contents

Class AggregateExplainOperation

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

Represents an aggregate explain operations.

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

Constructors

AggregateExplainOperation(CollectionNamespace, IEnumerable<BsonDocument>, MessageEncoderSettings)

Initializes a new instance of the AggregateExplainOperation class.

public AggregateExplainOperation(CollectionNamespace collectionNamespace, IEnumerable<BsonDocument> pipeline, MessageEncoderSettings messageEncoderSettings)

Parameters

collectionNamespace CollectionNamespace

The collection namespace.

pipeline IEnumerable<BsonDocument>

The pipeline.

messageEncoderSettings MessageEncoderSettings

The message encoder settings.

Properties

AllowDiskUse

Gets or sets a value indicating whether the server is allowed to use the disk.

public bool? AllowDiskUse { get; set; }

Property Value

bool?

A value indicating whether the server is allowed to use the disk.

Collation

Gets or sets the collation.

public Collation Collation { get; set; }

Property Value

Collation

The collation.

CollectionNamespace

Gets the collection namespace.

public CollectionNamespace CollectionNamespace { get; }

Property Value

CollectionNamespace

The collection namespace.

Comment

Gets or sets the comment.

public string Comment { get; set; }

Property Value

string

The comment.

Hint

Gets or sets the hint. This must either be a BsonString representing the index name or a BsonDocument representing the key pattern of the index.

public BsonValue Hint { get; set; }

Property Value

BsonValue

The hint.

MaxTime

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

public TimeSpan? MaxTime { get; set; }

Property Value

TimeSpan?

The maximum time the server should spend on this operation.

MessageEncoderSettings

Gets the message encoder settings.

public MessageEncoderSettings MessageEncoderSettings { get; }

Property Value

MessageEncoderSettings

The message encoder settings.

Pipeline

Gets the pipeline.

public IReadOnlyList<BsonDocument> Pipeline { get; }

Property Value

IReadOnlyList<BsonDocument>

The pipeline.

Methods

Execute(IReadBinding, CancellationToken)

Executes the operation.

public BsonDocument Execute(IReadBinding binding, CancellationToken cancellationToken)

Parameters

binding IReadBinding

The binding.

cancellationToken CancellationToken

The cancellation token.

Returns

BsonDocument

The result of the operation.

ExecuteAsync(IReadBinding, CancellationToken)

Executes the operation.

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

Parameters

binding IReadBinding

The binding.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<BsonDocument>

A Task whose result is the result of the operation.