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.3.0
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.Driver.Optional<TimeSpan>
The average round trip time.
canonicalEndPoint (Optional)
Type: MongoDB.Driver.Optional<EndPoint>
The canonical end point.
electionId (Optional)
Type: MongoDB.Driver.Optional<ElectionId>
The election identifier.
heartbeatException (Optional)
Type: MongoDB.Driver.Optional<Exception>
The heartbeat exception.
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.
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