Table of Contents

Method DropOneAsync

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

DropOneAsync(string, CancellationToken)

Drops an index by its name.

public abstract Task DropOneAsync(string name, CancellationToken cancellationToken = default)

Parameters

name string

The name.

cancellationToken CancellationToken

The cancellation token.

Returns

Task

A task.

DropOneAsync(string, DropIndexOptions, CancellationToken)

Drops an index by its name.

public virtual Task DropOneAsync(string name, DropIndexOptions options, CancellationToken cancellationToken = default)

Parameters

name string

The name.

options DropIndexOptions

The options.

cancellationToken CancellationToken

The cancellation token.

Returns

Task

A task.

DropOneAsync(IClientSessionHandle, string, CancellationToken)

Drops an index by its name.

public virtual Task DropOneAsync(IClientSessionHandle session, string name, CancellationToken cancellationToken = default)

Parameters

session IClientSessionHandle

The session.

name string

The name.

cancellationToken CancellationToken

The cancellation token.

Returns

Task

A task.

DropOneAsync(IClientSessionHandle, string, DropIndexOptions, CancellationToken)

Drops an index by its name.

public virtual Task DropOneAsync(IClientSessionHandle session, string name, DropIndexOptions options, CancellationToken cancellationToken)

Parameters

session IClientSessionHandle

The session.

name string

The name.

options DropIndexOptions

The options.

cancellationToken CancellationToken

The cancellation token.

Returns

Task

A task.