Table of Contents

Class HelloResult

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

Represents the result of a hello or legacy hello command.

public class HelloResult : IEquatable<HelloResult>
Inheritance
HelloResult
Implements
Derived
Inherited Members

Constructors

HelloResult(BsonDocument)

Initializes a new instance of the HelloResult class.

public HelloResult(BsonDocument wrapped)

Parameters

wrapped BsonDocument

The wrapped result document.

Properties

Compressions

Gets the compressor types.

public IReadOnlyList<CompressorType> Compressions { get; }

Property Value

IReadOnlyList<CompressorType>

ConnectionIdServerValue

Gets the connection id server value.

public long? ConnectionIdServerValue { get; }

Property Value

long?

ElectionId

Gets the election identifier.

public ElectionId ElectionId { get; }

Property Value

ElectionId

HasSaslSupportedMechs

Get whether SaslSupportedMechs was part of the hello response.

public bool HasSaslSupportedMechs { get; }

Property Value

bool

Whether SaslSupportedMechs was part of the hello response.

HelloOk

Gets whether the server support the hello command.

public bool HelloOk { get; }

Property Value

bool

True if helloOk:true was included in the response; false otherwise.

IsArbiter

Gets a value indicating whether this instance is an arbiter.

public bool IsArbiter { get; }

Property Value

bool

true if this instance is an arbiter; otherwise, false.

IsMongocryptd

Gets a value indicating whether this instance is a mongocryptd.

public bool IsMongocryptd { get; }

Property Value

bool

true if this instance is a mongocryptd; otherwise, false.

IsReplicaSetMember

Gets a value indicating whether this instance is a replica set member.

public bool IsReplicaSetMember { get; }

Property Value

bool

true if this instance is a replica set member; otherwise, false.

LastWriteTimestamp

Gets the last write timestamp.

public DateTime? LastWriteTimestamp { get; }

Property Value

DateTime?

The last write timestamp.

LogicalSessionTimeout

Gets the logical session timeout.

public TimeSpan? LogicalSessionTimeout { get; }

Property Value

TimeSpan?

The logical session timeout.

MaxBatchCount

Gets the maximum number of documents in a batch.

public int MaxBatchCount { get; }

Property Value

int

The maximum number of documents in a batch.

MaxDocumentSize

Gets the maximum size of a document.

public int MaxDocumentSize { get; }

Property Value

int

The maximum size of a document.

MaxMessageSize

Gets the maximum size of a message.

public int MaxMessageSize { get; }

Property Value

int

The maximum size of a message.

MaxWireVersion

Gets the maximum wire version.

public int MaxWireVersion { get; }

Property Value

int

The maximum wire version.

Me

Gets the endpoint the server is claiming it is known as.

public EndPoint Me { get; }

Property Value

EndPoint

MinWireVersion

Gets the minimum wire version.

public int MinWireVersion { get; }

Property Value

int

The minimum wire version.

SaslSupportedMechs

Get the SaslSupportedMechs.

public IEnumerable<string> SaslSupportedMechs { get; }

Property Value

IEnumerable<string>

The SaslSupportedMechs. Empty if saslSupportedMechs was an empty list or if saslSupportedMechs was not included in the hello response.

ServerType

Gets the type of the server.

public ServerType ServerType { get; }

Property Value

ServerType

The type of the server.

ServiceId

Gets the service identifier.

public ObjectId? ServiceId { get; }

Property Value

ObjectId?

The service identifier.

SpeculativeAuthenticate

Get the SpeculativeAuthenticate reply.

public BsonDocument SpeculativeAuthenticate { get; }

Property Value

BsonDocument

Null if hello["ok"] != 1 or if the SpeculativeAuthenticate reply was not included in the hello response.

Tags

Gets the replica set tags.

public TagSet Tags { get; }

Property Value

TagSet

The replica set tags.

TopologyVersion

Get the TopologyVersion.

public TopologyVersion TopologyVersion { get; }

Property Value

TopologyVersion

Null if TopologyVersion was not included in the hello response.

Wrapped

Gets the wrapped result document.

public BsonDocument Wrapped { get; }

Property Value

BsonDocument

The wrapped result document.

Methods

Equals(HelloResult)

public bool Equals(HelloResult other)

Parameters

other HelloResult

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

GetReplicaSetConfig()

Gets the replica set configuration.

public ReplicaSetConfig GetReplicaSetConfig()

Returns

ReplicaSetConfig

The replica set configuration.