Method With
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
MongoDB.Driver.Core.Configuration
Assembly
MongoDB.Driver.dll
With(Optional, Optional, Optional<IEnumerable>, Optional, Optional, Optional, Optional, Optional, Optional, Optional, Optional, Optional, Optional, Optional)
Returns a new ClusterSettings instance with some settings changed.
public ClusterSettings With(Optional<CryptClientSettings> cryptClientSettings = default, Optional<bool> directConnection = default, Optional<IEnumerable<EndPoint>> endPoints = default, Optional<bool> loadBalanced = default, Optional<TimeSpan> localThreshold = default, Optional<int> maxServerSelectionWaitQueueSize = default, Optional<string> replicaSetName = default, Optional<ServerApi> serverApi = default, Optional<TimeSpan> serverSelectionTimeout = default, Optional<IServerSelector> preServerSelector = default, Optional<IServerSelector> postServerSelector = default, Optional<ConnectionStringScheme> scheme = default, Optional<int> srvMaxHosts = default, Optional<string> srvServiceName = default)
Parameters
cryptClientSettings
Optional<CryptClientSettings>
Crypt client settings.
directConnection
Optional<bool>
The directConnection.
endPoints
Optional<IEnumerable<EndPoint>>
The end points.
The load balanced.
localThreshold
Optional<TimeSpan>
The local threshold.
maxServerSelectionWaitQueueSize
Optional<int>
Maximum size of the server selection wait queue.
replicaSetName
Optional<string>
Name of the replica set.
The server API.
serverSelectionTimeout
Optional<TimeSpan>
The server selection timeout.
preServerSelector
Optional<IServerSelector>
The pre server selector.
postServerSelector
Optional<IServerSelector>
The post server selector.
scheme
Optional<ConnectionStringScheme>
The connection string scheme.
Limits the number of SRV records used to populate the seedlist during initial discovery, as well as the number of additional hosts that may be added during SRV polling.
srvServiceName
Optional<string>
The SRV service name which modifies the srv URI to look like:
_{srvServiceName}._tcp.{hostname}.{domainname}
Defaults to "mongodb".
Returns
A new ClusterSettings instance.