ConnectionSettingsWith Method |
Returns a new ConnectionSettings instance with some settings changed.
Namespace: MongoDB.Driver.Core.ConfigurationAssembly: MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.0.1
Syntax public ConnectionSettings With(
Optional<IEnumerable<IAuthenticator>> authenticators = null,
Optional<TimeSpan> maxIdleTime = null,
Optional<TimeSpan> maxLifeTime = null
)
Public Function With (
Optional authenticators As Optional(Of IEnumerable(Of IAuthenticator)) = Nothing,
Optional maxIdleTime As Optional(Of TimeSpan) = Nothing,
Optional maxLifeTime As Optional(Of TimeSpan) = Nothing
) As ConnectionSettings
member With :
?authenticators : Optional<IEnumerable<IAuthenticator>> *
?maxIdleTime : Optional<TimeSpan> *
?maxLifeTime : Optional<TimeSpan>
(* Defaults:
let _authenticators = defaultArg authenticators null
let _maxIdleTime = defaultArg maxIdleTime null
let _maxLifeTime = defaultArg maxLifeTime null
*)
-> ConnectionSettings
Parameters
- authenticators (Optional)
- Type: MongoDB.DriverOptionalIEnumerableIAuthenticator
The authenticators. - maxIdleTime (Optional)
- Type: MongoDB.DriverOptionalTimeSpan
The maximum idle time. - maxLifeTime (Optional)
- Type: MongoDB.DriverOptionalTimeSpan
The maximum life time.
Return Value
Type:
ConnectionSettingsA new ConnectionSettings instance.
See Also