Table of Contents

Method With

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

With(ReadPreferenceHedge)

Returns a new instance of ReadPreference with some values changed.

public ReadPreference With(ReadPreferenceHedge hedge)

Parameters

hedge ReadPreferenceHedge

The hedge.

Returns

ReadPreference

A new instance of ReadPreference.

With(ReadPreferenceMode)

Returns a new instance of ReadPreference with some values changed.

public ReadPreference With(ReadPreferenceMode mode)

Parameters

mode ReadPreferenceMode

The read preference mode.

Returns

ReadPreference

A new instance of ReadPreference.

With(IEnumerable<TagSet>)

Returns a new instance of ReadPreference with some values changed.

public ReadPreference With(IEnumerable<TagSet> tagSets)

Parameters

tagSets IEnumerable<TagSet>

The tag sets.

Returns

ReadPreference

A new instance of ReadPreference.

With(TimeSpan?)

Returns a new instance of ReadPreference with some values changed.

public ReadPreference With(TimeSpan? maxStaleness)

Parameters

maxStaleness TimeSpan?

The maximum staleness.

Returns

ReadPreference

A new instance of ReadPreference.