TransactionOptionsWith Method |
Returns a new TransactionOptions with some values changed.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.15.0+f503bf610759c13f78cff9a3c01e91453185d2ed
Syntax public TransactionOptions With(
Optional<ReadConcern> readConcern = default,
Optional<ReadPreference> readPreference = default,
Optional<WriteConcern> writeConcern = default,
Optional<TimeSpan?> maxCommitTime = default
)
Public Function With (
Optional readConcern As Optional(Of ReadConcern) = Nothing,
Optional readPreference As Optional(Of ReadPreference) = Nothing,
Optional writeConcern As Optional(Of WriteConcern) = Nothing,
Optional maxCommitTime As Optional(Of TimeSpan?) = Nothing
) As TransactionOptions
member With :
?readConcern : Optional<ReadConcern> *
?readPreference : Optional<ReadPreference> *
?writeConcern : Optional<WriteConcern> *
?maxCommitTime : Optional<Nullable<TimeSpan>>
(* Defaults:
let _readConcern = defaultArg readConcern new Optional<ReadConcern>()
let _readPreference = defaultArg readPreference new Optional<ReadPreference>()
let _writeConcern = defaultArg writeConcern new Optional<WriteConcern>()
let _maxCommitTime = defaultArg maxCommitTime new Optional<Nullable<TimeSpan>>()
*)
-> TransactionOptions
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