Constructor ServerDescription
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
- serverIdServerId
- The server identifier. 
- endPointEndPoint
- The end point. 
- reasonChangedOptional<string>
- The reason the server description was last changed. 
- averageRoundTripTimeOptional<TimeSpan>
- The average round trip time. 
- canonicalEndPointOptional<EndPoint>
- The canonical end point. 
- electionIdOptional<ElectionId>
- The election identifier. 
- heartbeatExceptionOptional<Exception>
- The heartbeat exception. 
- heartbeatIntervalOptional<TimeSpan>
- The heartbeat interval. 
- helloOkOptional<bool>
- Whether the server supports the hello command. 
- lastHeartbeatTimestampOptional<DateTime?>
- The last heartbeat timestamp. 
- lastUpdateTimestampOptional<DateTime>
- The last update timestamp. 
- lastWriteTimestampOptional<DateTime?>
- The last write timestamp. 
- logicalSessionTimeoutOptional<TimeSpan?>
- The logical session timeout. 
- maxBatchCountOptional<int>
- The maximum batch count. 
- maxDocumentSizeOptional<int>
- The maximum size of a document. 
- maxMessageSizeOptional<int>
- The maximum size of a message. 
- maxWireDocumentSizeOptional<int>
- The maximum size of a wire document. 
- replicaSetConfigOptional<ReplicaSetConfig>
- The replica set configuration. 
- stateOptional<ServerState>
- The server state. 
- tagsOptional<TagSet>
- The replica set tags. 
- topologyVersionOptional<TopologyVersion>
- The topology version. 
- typeOptional<ServerType>
- The server type. 
- versionOptional<SemanticVersion>
- The server version. 
- wireVersionRangeOptional<Range<int>>
- The wire version range. 
Exceptions
- ArgumentException
- EndPoint and ServerId.EndPoint must match.