Table of Contents

Constructor ServerDescription

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

ServerDescription(ServerId, EndPoint, Optional<string>, Optional<TimeSpan>, Optional<EndPoint>, Optional<ElectionId>, Optional<Exception>, Optional<TimeSpan>, Optional<bool>, Optional<DateTime?>, Optional<DateTime>, Optional<DateTime?>, Optional<TimeSpan?>, Optional<int>, Optional<int>, Optional<int>, Optional<int>, Optional<ReplicaSetConfig>, Optional<ServerState>, Optional<TagSet>, Optional<TopologyVersion>, Optional<ServerType>, Optional<SemanticVersion>, Optional<Range<int>>)

Initializes a new instance of the ServerDescription class.

public ServerDescription(ServerId serverId, EndPoint endPoint, Optional<string> reasonChanged = default, Optional<TimeSpan> averageRoundTripTime = default, Optional<EndPoint> canonicalEndPoint = default, Optional<ElectionId> electionId = default, Optional<Exception> heartbeatException = default, Optional<TimeSpan> heartbeatInterval = default, Optional<bool> helloOk = default, Optional<DateTime?> lastHeartbeatTimestamp = default, Optional<DateTime> lastUpdateTimestamp = default, Optional<DateTime?> lastWriteTimestamp = default, Optional<TimeSpan?> logicalSessionTimeout = default, Optional<int> maxBatchCount = default, Optional<int> maxDocumentSize = default, Optional<int> maxMessageSize = default, Optional<int> maxWireDocumentSize = default, Optional<ReplicaSetConfig> replicaSetConfig = default, Optional<ServerState> state = default, Optional<TagSet> tags = default, Optional<TopologyVersion> topologyVersion = default, Optional<ServerType> type = default, Optional<SemanticVersion> version = default, Optional<Range<int>> wireVersionRange = default)

Parameters

serverId ServerId

The server identifier.

endPoint EndPoint

The end point.

reasonChanged Optional<string>

The reason the server description was last changed.

averageRoundTripTime Optional<TimeSpan>

The average round trip time.

canonicalEndPoint Optional<EndPoint>

The canonical end point.

electionId Optional<ElectionId>

The election identifier.

heartbeatException Optional<Exception>

The heartbeat exception.

heartbeatInterval Optional<TimeSpan>

The heartbeat interval.

helloOk Optional<bool>

Whether the server supports the hello command.

lastHeartbeatTimestamp Optional<DateTime?>

The last heartbeat timestamp.

lastUpdateTimestamp Optional<DateTime>

The last update timestamp.

lastWriteTimestamp Optional<DateTime?>

The last write timestamp.

logicalSessionTimeout Optional<TimeSpan?>

The logical session timeout.

maxBatchCount Optional<int>

The maximum batch count.

maxDocumentSize Optional<int>

The maximum size of a document.

maxMessageSize Optional<int>

The maximum size of a message.

maxWireDocumentSize Optional<int>

The maximum size of a wire document.

replicaSetConfig Optional<ReplicaSetConfig>

The replica set configuration.

state Optional<ServerState>

The server state.

tags Optional<TagSet>

The replica set tags.

topologyVersion Optional<TopologyVersion>

The topology version.

type Optional<ServerType>

The server type.

version Optional<SemanticVersion>

The server version.

wireVersionRange Optional<Range<int>>

The wire version range.

Exceptions

ArgumentException

EndPoint and ServerId.EndPoint must match.