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.12.2+a4a3888f4fb51bb518b1eb5002effc2d47f2ea6a
Syntax
public ClusterSettings With(
	Optional<ClusterConnectionMode> connectionMode = null,
	Optional<ConnectionModeSwitch> connectionModeSwitch = null,
	Optional<Nullable<bool>> directConnection = null,
	Optional<IEnumerable<EndPoint>> endPoints = null,
	Optional<IReadOnlyDictionary<string, IReadOnlyDictionary<string, Object>>> kmsProviders = null,
	Optional<TimeSpan> localThreshold = null,
	Optional<int> maxServerSelectionWaitQueueSize = null,
	Optional<string> replicaSetName = null,
	Optional<TimeSpan> serverSelectionTimeout = null,
	Optional<IServerSelector> preServerSelector = null,
	Optional<IServerSelector> postServerSelector = null,
	Optional<IReadOnlyDictionary<string, BsonDocument>> schemaMap = null,
	Optional<ConnectionStringScheme> scheme = null
)

Parameters

connectionMode (Optional)
Type: MongoDB.DriverOptionalClusterConnectionMode
The connection mode.
connectionModeSwitch (Optional)
Type: MongoDB.DriverOptionalConnectionModeSwitch
The connection mode switch.
directConnection (Optional)
Type: MongoDB.DriverOptionalNullableBoolean
The directConnection.
endPoints (Optional)
Type: MongoDB.DriverOptionalIEnumerableEndPoint
The end points.
kmsProviders (Optional)
Type: MongoDB.DriverOptionalIReadOnlyDictionaryString, IReadOnlyDictionaryString, Object
The kms providers.
localThreshold (Optional)
Type: MongoDB.DriverOptionalTimeSpan
The local threshold.
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.
schemaMap (Optional)
Type: MongoDB.DriverOptionalIReadOnlyDictionaryString, BsonDocument
The schema map.
scheme (Optional)
Type: MongoDB.DriverOptionalConnectionStringScheme
The connection string scheme.

Return Value

Type: ClusterSettings
A new ClusterSettings instance.
See Also