Click or drag to resize

ClusterSettingsWith Method

Returns a new ClusterSettings instance with some settings changed.

Namespace:  MongoDB.Driver.Core.Configuration
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.9.0+32b058abcdf2c7e8d9dd3a676d207b31897eee2e
Syntax
public ClusterSettings With(
	Optional<ClusterConnectionMode> connectionMode = null,
	Optional<IEnumerable<EndPoint>> endPoints = null,
	Optional<int> maxServerSelectionWaitQueueSize = null,
	Optional<string> replicaSetName = null,
	Optional<TimeSpan> serverSelectionTimeout = null,
	Optional<IServerSelector> preServerSelector = null,
	Optional<IServerSelector> postServerSelector = null,
	Optional<ConnectionStringScheme> scheme = null
)

Parameters

connectionMode (Optional)
Type: MongoDB.DriverOptionalClusterConnectionMode
The connection mode.
endPoints (Optional)
Type: MongoDB.DriverOptionalIEnumerableEndPoint
The end points.
maxServerSelectionWaitQueueSize (Optional)
Type: MongoDB.DriverOptionalInt32
Maximum size of the server selection wait queue.
replicaSetName (Optional)
Type: MongoDB.DriverOptionalString
Name of the replica set.
serverSelectionTimeout (Optional)
Type: MongoDB.DriverOptionalTimeSpan
The server selection timeout.
preServerSelector (Optional)
Type: MongoDB.DriverOptionalIServerSelector
The pre server selector.
postServerSelector (Optional)
Type: MongoDB.DriverOptionalIServerSelector
The post server selector.
scheme (Optional)
Type: MongoDB.DriverOptionalConnectionStringScheme
The connection string scheme.

Return Value

Type: ClusterSettings
A new ClusterSettings instance.
See Also