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.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
)
Public Function With (
Optional reasonChanged As Optional(Of String) = Nothing,
Optional averageRoundTripTime As Optional(Of TimeSpan) = Nothing,
Optional canonicalEndPoint As Optional(Of EndPoint) = Nothing,
Optional helloOk As Optional(Of Boolean) = Nothing,
Optional electionId As Optional(Of ElectionId) = Nothing,
Optional heartbeatException As Optional(Of Exception) = Nothing,
Optional heartbeatInterval As Optional(Of TimeSpan) = Nothing,
Optional lastHeartbeatTimestamp As Optional(Of DateTime?) = Nothing,
Optional lastUpdateTimestamp As Optional(Of DateTime) = Nothing,
Optional lastWriteTimestamp As Optional(Of DateTime?) = Nothing,
Optional logicalSessionTimeout As Optional(Of TimeSpan?) = Nothing,
Optional maxBatchCount As Optional(Of Integer) = Nothing,
Optional maxDocumentSize As Optional(Of Integer) = Nothing,
Optional maxMessageSize As Optional(Of Integer) = Nothing,
Optional maxWireDocumentSize As Optional(Of Integer) = Nothing,
Optional replicaSetConfig As Optional(Of ReplicaSetConfig) = Nothing,
Optional state As Optional(Of ServerState) = Nothing,
Optional tags As Optional(Of TagSet) = Nothing,
Optional topologyVersion As Optional(Of TopologyVersion) = Nothing,
Optional type As Optional(Of ServerType) = Nothing,
Optional version As Optional(Of SemanticVersion) = Nothing,
Optional wireVersionRange As Optional(Of Range(Of Integer)) = Nothing
) As ServerDescription
member With :
?reasonChanged : Optional<string> *
?averageRoundTripTime : Optional<TimeSpan> *
?canonicalEndPoint : Optional<EndPoint> *
?helloOk : Optional<bool> *
?electionId : Optional<ElectionId> *
?heartbeatException : Optional<Exception> *
?heartbeatInterval : Optional<TimeSpan> *
?lastHeartbeatTimestamp : Optional<Nullable<DateTime>> *
?lastUpdateTimestamp : Optional<DateTime> *
?lastWriteTimestamp : Optional<Nullable<DateTime>> *
?logicalSessionTimeout : Optional<Nullable<TimeSpan>> *
?maxBatchCount : Optional<int> *
?maxDocumentSize : Optional<int> *
?maxMessageSize : Optional<int> *
?maxWireDocumentSize : Optional<int> *
?replicaSetConfig : Optional<ReplicaSetConfig> *
?state : Optional<ServerState> *
?tags : Optional<TagSet> *
?topologyVersion : Optional<TopologyVersion> *
?type : Optional<ServerType> *
?version : Optional<SemanticVersion> *
?wireVersionRange : Optional<Range<int>>
(* Defaults:
let _reasonChanged = defaultArg reasonChanged new Optional<string>()
let _averageRoundTripTime = defaultArg averageRoundTripTime new Optional<TimeSpan>()
let _canonicalEndPoint = defaultArg canonicalEndPoint new Optional<EndPoint>()
let _helloOk = defaultArg helloOk new Optional<bool>()
let _electionId = defaultArg electionId new Optional<ElectionId>()
let _heartbeatException = defaultArg heartbeatException new Optional<Exception>()
let _heartbeatInterval = defaultArg heartbeatInterval new Optional<TimeSpan>()
let _lastHeartbeatTimestamp = defaultArg lastHeartbeatTimestamp new Optional<Nullable<DateTime>>()
let _lastUpdateTimestamp = defaultArg lastUpdateTimestamp new Optional<DateTime>()
let _lastWriteTimestamp = defaultArg lastWriteTimestamp new Optional<Nullable<DateTime>>()
let _logicalSessionTimeout = defaultArg logicalSessionTimeout new Optional<Nullable<TimeSpan>>()
let _maxBatchCount = defaultArg maxBatchCount new Optional<int>()
let _maxDocumentSize = defaultArg maxDocumentSize new Optional<int>()
let _maxMessageSize = defaultArg maxMessageSize new Optional<int>()
let _maxWireDocumentSize = defaultArg maxWireDocumentSize new Optional<int>()
let _replicaSetConfig = defaultArg replicaSetConfig new Optional<ReplicaSetConfig>()
let _state = defaultArg state new Optional<ServerState>()
let _tags = defaultArg tags new Optional<TagSet>()
let _topologyVersion = defaultArg topologyVersion new Optional<TopologyVersion>()
let _type = defaultArg type new Optional<ServerType>()
let _version = defaultArg version new Optional<SemanticVersion>()
let _wireVersionRange = defaultArg wireVersionRange new Optional<Range<int>>()
*)
-> ServerDescription
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. - helloOk (Optional)
- Type: MongoDB.DriverOptionalBoolean
Whether the server supports the hello command. - 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