Table of Contents

Method With

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

With(Optional<ReadConcern>, Optional<ReadPreference>, Optional<WriteConcern>, Optional<TimeSpan?>)

Returns a new TransactionOptions with some values changed.

public TransactionOptions With(Optional<ReadConcern> readConcern = default, Optional<ReadPreference> readPreference = default, Optional<WriteConcern> writeConcern = default, Optional<TimeSpan?> maxCommitTime = default)

Parameters

readConcern Optional<ReadConcern>

The new read concern.

readPreference Optional<ReadPreference>

The read preference.

writeConcern Optional<WriteConcern>

The new write concern.

maxCommitTime Optional<TimeSpan?>

The max commit time.

Returns

TransactionOptions

The new TransactionOptions.