Click or drag to resize

TransactionOptions.With Method

Returns a new TransactionOptions with some values changed.

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

Parameters

readConcern (Optional)
Type: MongoDB.Driver.Optional<ReadConcern>
The new read concern.
readPreference (Optional)
Type: MongoDB.Driver.Optional<ReadPreference>
The read preference.
writeConcern (Optional)
Type: MongoDB.Driver.Optional<WriteConcern>
The new write concern.
maxCommitTime (Optional)
Type: MongoDB.Driver.Optional<Nullable<TimeSpan>>
The max commit time.

Return Value

Type: TransactionOptions
The new TransactionOptions.
See Also