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.9.0+32b058abcdf2c7e8d9dd3a676d207b31897eee2e
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
)
Public Function With (
Optional authenticators As Optional(Of IEnumerable(Of IAuthenticator)) = Nothing,
Optional compressors As Optional(Of IEnumerable(Of CompressorConfiguration)) = Nothing,
Optional maxIdleTime As Optional(Of TimeSpan) = Nothing,
Optional maxLifeTime As Optional(Of TimeSpan) = Nothing,
Optional applicationName As Optional(Of String) = Nothing
) As ConnectionSettings
member With :
?authenticators : Optional<IEnumerable<IAuthenticator>> *
?compressors : Optional<IEnumerable<CompressorConfiguration>> *
?maxIdleTime : Optional<TimeSpan> *
?maxLifeTime : Optional<TimeSpan> *
?applicationName : Optional<string>
(* Defaults:
let _authenticators = defaultArg authenticators null
let _compressors = defaultArg compressors null
let _maxIdleTime = defaultArg maxIdleTime null
let _maxLifeTime = defaultArg maxLifeTime null
let _applicationName = defaultArg applicationName null
*)
-> ConnectionSettings
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:
ConnectionSettingsA new ConnectionSettings instance.
See Also