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.16.0+eeafbea0921243a5868b81984e1083a07c1f75bc
Syntax
public TransactionOptions With(
	Optional<ReadConcern> readConcern = default,
	Optional<ReadPreference> readPreference = default,
	Optional<WriteConcern> writeConcern = default,
	Optional<TimeSpan?> maxCommitTime = default
)

Parameters

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