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.5.0+57.Branch.master.Sha.6a4e00a2d91090c65a9b11364b9ebfdb9c7da076
Syntax
public ServerDescription With(
	Optional<TimeSpan> averageRoundTripTime = null,
	Optional<EndPoint> canonicalEndPoint = null,
	Optional<ElectionId> electionId = null,
	Optional<Exception> heartbeatException = null,
	Optional<TimeSpan> heartbeatInterval = 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<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.
heartbeatInterval (Optional)
Type: MongoDB.DriverOptionalTimeSpan
The heartbeat interval.
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.
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