Table of Contents

Constructor ReadPreference

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

ReadPreference(ReadPreferenceMode, IEnumerable<TagSet>, TimeSpan?, ReadPreferenceHedge)

Initializes a new instance of the ReadPreference class.

public ReadPreference(ReadPreferenceMode mode, IEnumerable<TagSet> tagSets = null, TimeSpan? maxStaleness = null, ReadPreferenceHedge hedge = null)

Parameters

mode ReadPreferenceMode

The read preference mode.

tagSets IEnumerable<TagSet>

The tag sets.

maxStaleness TimeSpan?

The maximum staleness.

hedge ReadPreferenceHedge

The hedge.