Table of Contents

Class ReadPreferenceHedge

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.Core.dll

Represents a read preference hedge.

public sealed class ReadPreferenceHedge : IEquatable<ReadPreferenceHedge>
Inheritance
ReadPreferenceHedge
Implements
Inherited Members

Constructors

ReadPreferenceHedge(bool)

Initializes an instance of ReadPreferenceHedge.

public ReadPreferenceHedge(bool isEnabled)

Parameters

isEnabled bool

Whether hedged reads are enabled.

Properties

Disabled

Gets a disabled read preference hedge.

public static ReadPreferenceHedge Disabled { get; }

Property Value

ReadPreferenceHedge

Enabled

Gets an enabled read preference hedge.

public static ReadPreferenceHedge Enabled { get; }

Property Value

ReadPreferenceHedge

IsEnabled

Gets whether hedged reads are enabled.

public bool IsEnabled { get; }

Property Value

bool

Methods

Equals(ReadPreferenceHedge)

public bool Equals(ReadPreferenceHedge other)

Parameters

other ReadPreferenceHedge

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToBsonDocument()

Converts the read preference hedge to a BsonDocument.

public BsonDocument ToBsonDocument()

Returns

BsonDocument

A BsonDocument.

ToString()

public override string ToString()

Returns

string