Click or drag to resize

ServerDescription.With 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.16.0+eeafbea0921243a5868b81984e1083a07c1f75bc
Syntax
public ServerDescription With(
	Optional<string> reasonChanged = default,
	Optional<TimeSpan> averageRoundTripTime = default,
	Optional<EndPoint> canonicalEndPoint = default,
	Optional<bool> helloOk = default,
	Optional<ElectionId> electionId = default,
	Optional<Exception> heartbeatException = default,
	Optional<TimeSpan> heartbeatInterval = 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

reasonChanged (Optional)
Type: MongoDB.Driver.Optional<String>
The reason the server description changed.
averageRoundTripTime (Optional)
Type: MongoDB.Driver.Optional<TimeSpan>
The average round trip time.
canonicalEndPoint (Optional)
Type: MongoDB.Driver.Optional<EndPoint>
The canonical end point.
helloOk (Optional)
Type: MongoDB.Driver.Optional<Boolean>
Whether the server supports the hello command.
electionId (Optional)
Type: MongoDB.Driver.Optional<ElectionId>
The election identifier.
heartbeatException (Optional)
Type: MongoDB.Driver.Optional<Exception>
The heartbeat exception.
heartbeatInterval (Optional)
Type: MongoDB.Driver.Optional<TimeSpan>
The heartbeat interval.
lastHeartbeatTimestamp (Optional)
Type: MongoDB.Driver.Optional<Nullable<DateTime>>
The last heartbeat timestamp.
lastUpdateTimestamp (Optional)
Type: MongoDB.Driver.Optional<DateTime>
The last update timestamp.
lastWriteTimestamp (Optional)
Type: MongoDB.Driver.Optional<Nullable<DateTime>>
The last write timestamp.
logicalSessionTimeout (Optional)
Type: MongoDB.Driver.Optional<Nullable<TimeSpan>>
The logical session timeout.
maxBatchCount (Optional)
Type: MongoDB.Driver.Optional<Int32>
The maximum batch count.
maxDocumentSize (Optional)
Type: MongoDB.Driver.Optional<Int32>
The maximum size of a document.
maxMessageSize (Optional)
Type: MongoDB.Driver.Optional<Int32>
The maximum size of a message.
maxWireDocumentSize (Optional)
Type: MongoDB.Driver.Optional<Int32>
The maximum size of a wire document.
replicaSetConfig (Optional)
Type: MongoDB.Driver.Optional<ReplicaSetConfig>
The replica set configuration.
state (Optional)
Type: MongoDB.Driver.Optional<ServerState>
The server state.
tags (Optional)
Type: MongoDB.Driver.Optional<TagSet>
The replica set tags.
topologyVersion (Optional)
Type: MongoDB.Driver.Optional<TopologyVersion>
The topology version.
type (Optional)
Type: MongoDB.Driver.Optional<ServerType>
The server type.
version (Optional)
Type: MongoDB.Driver.Optional<SemanticVersion>
The server version.
wireVersionRange (Optional)
Type: MongoDB.Driver.Optional<Range<Int32>>
The wire version range.

Return Value

Type: ServerDescription
A new instance of ServerDescription.
See Also