Table of Contents

Class NoCoreSession

Namespace
MongoDB.Driver.Core.Bindings
Assembly
MongoDB.Driver.Core.dll

An object that represents no core session.

public sealed class NoCoreSession : ICoreSession, IDisposable
Inheritance
NoCoreSession
Implements
Inherited Members

Properties

ClusterTime

Gets the cluster time.

CurrentTransaction

Gets the current transaction.

Id

Gets the session Id.

Instance

Gets the pre-created instance.

IsCausallyConsistent

Gets a value indicate whether this instance is causally consistent.

IsDirty

Gets a value indicate whether this session is dirty.

IsImplicit

Gets a value indicating whether this instance is implicit session.

IsInTransaction

Gets a value indicating whether this instance is in a transaction.

IsSnapshot

Gets a value indicate whether this instance is a snapshot session.

OperationTime

Gets the operation time.

Options

Gets the session options.

ServerSession

Gets the server session.

SnapshotTime

Gets the snapshot time.

Methods

AbortTransaction(CancellationToken)

Aborts the transaction.

AbortTransactionAsync(CancellationToken)

Aborts the transaction.

AboutToSendCommand()

The driver is about to send a command on this session. Called to track session state.

AdvanceClusterTime(BsonDocument)

Advances the cluster time.

AdvanceOperationTime(BsonTimestamp)

Advances the operation time.

AdvanceTransactionNumber()

Advances the transaction id.

CommitTransaction(CancellationToken)

Commits the transaction.

CommitTransactionAsync(CancellationToken)

Commits the transaction.

Dispose()
MarkDirty()

Marks the session as dirty.

NewHandle()

Returns a new handle to a NoCoreSession object.

SetSnapshotTimeIfNeeded(BsonTimestamp)

Sets the snapshot time if not set.

StartTransaction(TransactionOptions)

Starts a transaction.

WasUsed()

Called by the driver when the session is used (i.e. sent to the server).

See Also