Click or drag to resize

ServerDescription Constructor

Initializes a new instance of the ServerDescription class.

Namespace:  MongoDB.Driver.Core.Servers
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax
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
Type: MongoDB.Driver.Core.ServersServerId
The server identifier.
endPoint
Type: System.NetEndPoint
The end point.
reasonChanged (Optional)
Type: MongoDB.DriverOptionalString
The reason the server description was last changed.
averageRoundTripTime (Optional)
Type: MongoDB.DriverOptionalTimeSpan
The average round trip time.
canonicalEndPoint (Optional)
Type: MongoDB.DriverOptionalEndPoint
The canonical end point.
electionId (Optional)
Type: MongoDB.DriverOptionalElectionId
The election identifier.
heartbeatException (Optional)
Type: MongoDB.DriverOptionalException
The heartbeat exception.
heartbeatInterval (Optional)
Type: MongoDB.DriverOptionalTimeSpan
The heartbeat interval.
helloOk (Optional)
Type: MongoDB.DriverOptionalBoolean
Whether the server supports the hello command.
lastHeartbeatTimestamp (Optional)
Type: MongoDB.DriverOptionalNullableDateTime
The last heartbeat timestamp.
lastUpdateTimestamp (Optional)
Type: MongoDB.DriverOptionalDateTime
The last update timestamp.
lastWriteTimestamp (Optional)
Type: MongoDB.DriverOptionalNullableDateTime
The last write timestamp.
logicalSessionTimeout (Optional)
Type: MongoDB.DriverOptionalNullableTimeSpan
The logical session timeout.
maxBatchCount (Optional)
Type: MongoDB.DriverOptionalInt32
The maximum batch count.
maxDocumentSize (Optional)
Type: MongoDB.DriverOptionalInt32
The maximum size of a document.
maxMessageSize (Optional)
Type: MongoDB.DriverOptionalInt32
The maximum size of a message.
maxWireDocumentSize (Optional)
Type: MongoDB.DriverOptionalInt32
The maximum size of a wire document.
replicaSetConfig (Optional)
Type: MongoDB.DriverOptionalReplicaSetConfig
The replica set configuration.
state (Optional)
Type: MongoDB.DriverOptionalServerState
The server state.
tags (Optional)
Type: MongoDB.DriverOptionalTagSet
The replica set tags.
topologyVersion (Optional)
Type: MongoDB.DriverOptionalTopologyVersion
The topology version.
type (Optional)
Type: MongoDB.DriverOptionalServerType
The server type.
version (Optional)
Type: MongoDB.DriverOptionalSemanticVersion
The server version.
wireVersionRange (Optional)
Type: MongoDB.DriverOptionalRangeInt32
The wire version range.
Exceptions
ExceptionCondition
ArgumentExceptionEndPoint and ServerId.EndPoint must match.
See Also