Click or drag to resize

TransactionOptionsWith Method

Returns a new TransactionOptions with some values changed.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.10.0+569905ff5e778c38ea19d9d0392496a83e1704ed
public TransactionOptions With(
	Optional<ReadConcern> readConcern = null,
	Optional<ReadPreference> readPreference = null,
	Optional<WriteConcern> writeConcern = null,
	Optional<Nullable<TimeSpan>> maxCommitTime = null


readConcern (Optional)
Type: MongoDB.DriverOptionalReadConcern
The new read concern.
readPreference (Optional)
Type: MongoDB.DriverOptionalReadPreference
The read preference.
writeConcern (Optional)
Type: MongoDB.DriverOptionalWriteConcern
The new write concern.
maxCommitTime (Optional)
Type: MongoDB.DriverOptionalNullableTimeSpan
The max commit time.

Return Value

Type: TransactionOptions
The new TransactionOptions.
See Also