Table of Contents

Class EndTransactionOperation

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

Abstract base class for AbortTransactionOperation and CommitTransactionOperation.

public abstract class EndTransactionOperation : IReadOperation<BsonDocument>
Inheritance
EndTransactionOperation
Implements
Derived
Inherited Members
Extension Methods

Constructors

EndTransactionOperation(BsonDocument, WriteConcern)

Initializes a new instance of the EndTransactionOperation class.

protected EndTransactionOperation(BsonDocument recoveryToken, WriteConcern writeConcern)

Parameters

recoveryToken BsonDocument

The recovery token.

writeConcern WriteConcern

The write concern.

EndTransactionOperation(WriteConcern)

Initializes a new instance of the EndTransactionOperation class.

protected EndTransactionOperation(WriteConcern writeConcern)

Parameters

writeConcern WriteConcern

The write concern.

Properties

CommandName

Gets the name of the command.

protected abstract string CommandName { get; }

Property Value

string

The name of the command.

MessageEncoderSettings

Gets or sets the message encoder settings.

public MessageEncoderSettings MessageEncoderSettings { get; set; }

Property Value

MessageEncoderSettings

The message encoder settings.

WriteConcern

Gets the write concern.

public WriteConcern WriteConcern { get; }

Property Value

WriteConcern

The write concern.

Methods

CreateCommand()

Creates the command for the operation.

protected virtual BsonDocument CreateCommand()

Returns

BsonDocument

The command.

Execute(IReadBinding, CancellationToken)

Executes the operation.

public virtual 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 virtual 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.