Click or drag to resize

ConnectionSettingsWith Method

Returns a new ConnectionSettings instance with some settings changed.

Namespace:  MongoDB.Driver.Core.Configuration
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.10.0+569905ff5e778c38ea19d9d0392496a83e1704ed
Syntax
public ConnectionSettings With(
	Optional<IEnumerable<IAuthenticator>> authenticators = null,
	Optional<IEnumerable<CompressorConfiguration>> compressors = null,
	Optional<TimeSpan> maxIdleTime = null,
	Optional<TimeSpan> maxLifeTime = null,
	Optional<string> applicationName = null
)

Parameters

authenticators (Optional)
Type: MongoDB.DriverOptionalIEnumerableIAuthenticator
The authenticators.
compressors (Optional)
Type: MongoDB.DriverOptionalIEnumerableCompressorConfiguration
The compressors.
maxIdleTime (Optional)
Type: MongoDB.DriverOptionalTimeSpan
The maximum idle time.
maxLifeTime (Optional)
Type: MongoDB.DriverOptionalTimeSpan
The maximum life time.
applicationName (Optional)
Type: MongoDB.DriverOptionalString
The application name.

Return Value

Type: ConnectionSettings
A new ConnectionSettings instance.
See Also