ReadPreference Constructor |
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.19.1+3a2a09dd959482f665ffbb5df2557ec541597af4
Syntax public ReadPreference(
ReadPreferenceMode mode,
IEnumerable<TagSet> tagSets = null,
TimeSpan? maxStaleness = null,
ReadPreferenceHedge hedge = null
)
Public Sub New (
mode As ReadPreferenceMode,
Optional tagSets As IEnumerable(Of TagSet) = Nothing,
Optional maxStaleness As TimeSpan? = Nothing,
Optional hedge As ReadPreferenceHedge = Nothing
)
new :
mode : ReadPreferenceMode *
?tagSets : IEnumerable<TagSet> *
?maxStaleness : Nullable<TimeSpan> *
?hedge : ReadPreferenceHedge
(* Defaults:
let _tagSets = defaultArg tagSets null
let _maxStaleness = defaultArg maxStaleness null
let _hedge = defaultArg hedge null
*)
-> ReadPreference
Parameters
- mode
- Type: MongoDB.DriverReadPreferenceMode
The read preference mode. - tagSets (Optional)
- Type: System.Collections.GenericIEnumerableTagSet
The tag sets. - maxStaleness (Optional)
- Type: SystemNullableTimeSpan
The maximum staleness. - hedge (Optional)
- Type: MongoDB.DriverReadPreferenceHedge
The hedge.
See Also