Table of Contents

Class MongoClientSettings

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

The settings for a MongoDB client.

public class MongoClientSettings : IEquatable<MongoClientSettings>
Inheritance
MongoClientSettings
Implements
Inherited Members

Constructors

MongoClientSettings()

Creates a new instance of MongoClientSettings. Usually you would use a connection string instead.

Properties

AllowInsecureTls

Gets or sets whether to relax TLS constraints as much as possible. Setting this variable to true will also set SslSettings.CheckCertificateRevocation to false.

ApplicationName

Gets or sets the application name.

AutoEncryptionOptions

Gets or sets the auto encryption options.

ClusterConfigurator

Gets or sets the cluster configurator.

Compressors

Gets or sets the compressors.

ConnectTimeout

Gets or sets the connect timeout.

ConnectionMode

Gets or sets the connection mode.

ConnectionModeSwitch

Gets the connection mode switch.

Credential

Gets or sets the credential.

Credentials

Gets or sets the credentials.

DirectConnection

Gets or sets the direct connection.

GuidRepresentation

Gets or sets the representation to use for Guids.

HeartbeatInterval

Gets or sets the heartbeat interval.

HeartbeatTimeout

Gets or sets the heartbeat timeout.

IPv6

Gets or sets a value indicating whether to use IPv6.

IsFrozen

Gets a value indicating whether the settings have been frozen to prevent further changes.

LibraryInfo

Gets or sets information about a library using the .NET Driver.

LinqProvider

Gets or sets the LINQ provider.

LoadBalanced

Gets or sets whether load balanced mode is used.

LocalThreshold

Gets or sets the local threshold.

LoggingSettings

Gets or sets the logging settings

MaxConnecting

Gets or sets the maximum concurrently connecting connections.

MaxConnectionIdleTime

Gets or sets the max connection idle time.

MaxConnectionLifeTime

Gets or sets the max connection life time.

MaxConnectionPoolSize

Gets or sets the max connection pool size.

MinConnectionPoolSize

Gets or sets the min connection pool size.

ReadConcern

Gets or sets the read concern.

ReadEncoding

Gets or sets the Read Encoding.

ReadPreference

Gets or sets the read preferences.

ReplicaSetName

Gets or sets the name of the replica set.

RetryReads

Gets or sets whether to retry reads.

RetryWrites

Gets or sets whether to retry writes.

Scheme

Gets or sets the connection string scheme.

SdamLogFilename

Gets or set the name of the SDAM log file. Null turns logging off. stdout will log to console.

Server

Gets or sets the address of the server (see also Servers if using more than one address).

ServerApi

Gets or sets the server API.

ServerMonitoringMode

Gets or sets the server monitoring mode to use.

ServerSelectionTimeout

Gets or sets the server selection timeout.

Servers

Gets or sets the list of server addresses (see also Server if using only one address).

SocketTimeout

Gets or sets the socket timeout.

SrvMaxHosts

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.

SslSettings

Gets or sets the SSL settings.

UseSsl

Gets or sets a value indicating whether to use SSL.

UseTls

Gets or sets a value indicating whether to use TLS.

VerifySslCertificate

Gets or sets a value indicating whether to verify an SSL certificate.

WaitQueueSize

Gets or sets the wait queue size.

WaitQueueTimeout

Gets or sets the wait queue timeout.

WriteConcern

Gets or sets the WriteConcern to use.

WriteEncoding

Gets or sets the Write Encoding.

Methods

Clone()

Creates a clone of the settings.

Equals(MongoClientSettings)

Determines whether the specified MongoClientSettings is equal to this instance.

Equals(object)

Determines whether the specified object is equal to this instance.

Freeze()

Freezes the settings.

FromConnectionString(string)

Gets a MongoClientSettings object intialized with values from a connection string.

FromUrl(MongoUrl)

Gets a MongoClientSettings object intialized with values from a MongoURL.

FrozenCopy()

Returns a frozen copy of the settings.

GetHashCode()

Gets the hash code.

ToString()

Returns a string representation of the settings.

Operators

operator ==(MongoClientSettings, MongoClientSettings)

Determines whether two MongoClientSettings instances are equal.

operator !=(MongoClientSettings, MongoClientSettings)

Determines whether two MongoClientSettings instances are not equal.