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.0.1
Syntax
public ServerDescription With(
	Optional<TimeSpan> averageRoundTripTime = null,
	Optional<EndPoint> canonicalEndPoint = null,
	Optional<ElectionId> electionId = null,
	Optional<Exception> heartbeatException = 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<ServerType> type = null,
	Optional<SemanticVersion> version = null,
	Optional<Range<int>> wireVersionRange = null
)

Parameters

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.
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.
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