Click or drag to resize

ServerDescriptionWith Method

Returns a new instance of ServerDescription with some values changed.

Namespace:  MongoDB.Driver.Core.Servers
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.11.0+cb27a82ea70620ad1acad8058809be8302ae4f2a
Syntax
public ServerDescription With(
	Optional<string> reasonChanged = null,
	Optional<TimeSpan> averageRoundTripTime = null,
	Optional<EndPoint> canonicalEndPoint = null,
	Optional<ElectionId> electionId = null,
	Optional<Exception> heartbeatException = null,
	Optional<TimeSpan> heartbeatInterval = null,
	Optional<Nullable<DateTime>> lastHeartbeatTimestamp = null,
	Optional<DateTime> lastUpdateTimestamp = null,
	Optional<Nullable<DateTime>> lastWriteTimestamp = null,
	Optional<Nullable<TimeSpan>> logicalSessionTimeout = null,
	Optional<int> maxBatchCount = null,
	Optional<int> maxDocumentSize = null,
	Optional<int> maxMessageSize = null,
	Optional<int> maxWireDocumentSize = null,
	Optional<ReplicaSetConfig> replicaSetConfig = null,
	Optional<ServerState> state = null,
	Optional<TagSet> tags = null,
	Optional<TopologyVersion> topologyVersion = null,
	Optional<ServerType> type = null,
	Optional<SemanticVersion> version = null,
	Optional<Range<int>> wireVersionRange = null
)

Parameters

reasonChanged (Optional)
Type: MongoDB.DriverOptionalString
The reason the server description 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.
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.

Return Value

Type: ServerDescription
A new instance of ServerDescription.
See Also