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.14.0+2b37a1fe1cbdbe1a020b52b77f1197b6d77575e7
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.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