Table of Contents

Method With

Namespace
MongoDB.Driver.Core.Configuration
Assembly
MongoDB.Driver.dll

With(Optional<TimeSpan>, Optional<TimeSpan>, Optional<ServerMonitoringMode>)

Returns a new ServerSettings instance with some settings changed.

public ServerSettings With(Optional<TimeSpan> heartbeatInterval = default, Optional<TimeSpan> heartbeatTimeout = default, Optional<ServerMonitoringMode> serverMonitoringMode = default)

Parameters

heartbeatInterval Optional<TimeSpan>

The heartbeat interval.

heartbeatTimeout Optional<TimeSpan>

The heartbeat timeout.

serverMonitoringMode Optional<ServerMonitoringMode>

The server monitoring mode.

Returns

ServerSettings

A new ServerSettings instance.