Click or drag to resize

ReadPreference Constructor

Initializes a new instance of the ReadPreference class.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.12.2+a4a3888f4fb51bb518b1eb5002effc2d47f2ea6a
Syntax
public ReadPreference(
	ReadPreferenceMode mode,
	IEnumerable<TagSet> tagSets = null,
	Nullable<TimeSpan> maxStaleness = null,
	ReadPreferenceHedge hedge = null
)

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