Table of Contents

Class DropIndexOperation

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

Represents a drop index operation.

public class DropIndexOperation : IWriteOperation<BsonDocument>
Inheritance
DropIndexOperation
Implements
Inherited Members
Extension Methods

Constructors

DropIndexOperation(CollectionNamespace, BsonDocument, MessageEncoderSettings)

Initializes a new instance of the DropIndexOperation class.

public DropIndexOperation(CollectionNamespace collectionNamespace, BsonDocument keys, MessageEncoderSettings messageEncoderSettings)

Parameters

collectionNamespace CollectionNamespace

The collection namespace.

keys BsonDocument

The keys.

messageEncoderSettings MessageEncoderSettings

The message encoder settings.

DropIndexOperation(CollectionNamespace, string, MessageEncoderSettings)

Initializes a new instance of the DropIndexOperation class.

public DropIndexOperation(CollectionNamespace collectionNamespace, string indexName, MessageEncoderSettings messageEncoderSettings)

Parameters

collectionNamespace CollectionNamespace

The collection namespace.

indexName string

The name of the index.

messageEncoderSettings MessageEncoderSettings

The message encoder settings.

Properties

CollectionNamespace

Gets the collection namespace.

public CollectionNamespace CollectionNamespace { get; }

Property Value

CollectionNamespace

The collection namespace.

Comment

Gets or sets the comment.

public BsonValue Comment { get; set; }

Property Value

BsonValue

The comment.

IndexName

Gets the name of the index.

public string IndexName { get; }

Property Value

string

The name of the index.

MaxTime

Gets or sets the maximum time.

public TimeSpan? MaxTime { get; set; }

Property Value

TimeSpan?

The maximum time.

MessageEncoderSettings

Gets the message encoder settings.

public MessageEncoderSettings MessageEncoderSettings { get; }

Property Value

MessageEncoderSettings

The message encoder settings.

WriteConcern

Gets or sets the write concern.

public WriteConcern WriteConcern { get; set; }

Property Value

WriteConcern

The write concern.

Methods

Execute(IWriteBinding, CancellationToken)

Executes the operation.

public BsonDocument Execute(IWriteBinding binding, CancellationToken cancellationToken)

Parameters

binding IWriteBinding

The binding.

cancellationToken CancellationToken

The cancellation token.

Returns

BsonDocument

The result of the operation.

ExecuteAsync(IWriteBinding, CancellationToken)

Executes the operation.

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

Parameters

binding IWriteBinding

The binding.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<BsonDocument>

A Task whose result is the result of the operation.