Table of Contents

Class ConnectionString

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

Represents a connection string.

public sealed class ConnectionString
Inheritance
ConnectionString
Inherited Members

Constructors

ConnectionString(string)

Initializes a new instance of the ConnectionString class.

Properties

AllOptionNames

Gets all the option names.

AllUnknownOptionNames

Gets all the unknown option names.

ApplicationName

Gets the application name.

AuthMechanism

Gets the auth mechanism.

AuthMechanismProperties

Gets the auth mechanism properties.

AuthSource

Gets the auth source.

Compressors

Gets the requested compressors.

Connect

Gets the connection mode.

ConnectTimeout

Gets the connect timeout.

ConnectionModeSwitch

Gets the connection mode switch.

DatabaseName

Gets the name of the database.

DirectConnection

Gets the directConnection.

FSync

Gets the fsync value of the write concern.

HeartbeatInterval

Gets the heartbeat interval.

HeartbeatTimeout

Gets the heartbeat timeout.

Hosts

Gets the hosts.

Ipv6

Gets whether to use IPv6.

IsResolved

Gets whether the connection string has been resolved. Always true when scheme is MongoDB.

Journal

Gets the journal value of the write concern.

LoadBalanced

Gets a value indicating whether load balanced mode is used.

LocalThreshold

Gets the local threshold.

MaxConnecting

Gets the maximum number of connections a pool may be establishing concurrently. Defaults to 2.

MaxIdleTime

Gets the max idle time.

MaxLifeTime

Gets the max life time.

MaxPoolSize

Gets the max size of the connection pool.

MaxStaleness

Gets the max staleness.

MinPoolSize

Gets the min size of the connection pool.

Password

Gets the password.

ReadConcernLevel

Gets the read concern level.

ReadPreference

Gets the read preference.

ReadPreferenceTags

Gets the read preference tags.

ReplicaSet

Gets the replica set name.

RetryReads

Gets a value indicating whether or not to retry reads.

RetryWrites

Gets a value indicating whether or not to retry writes.

Scheme

Gets the connection string scheme.

ServerMonitoringMode

Gets the server monitoring mode.

ServerSelectionTimeout

Gets the server selection timeout.

SocketTimeout

Gets 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.

Ssl

Gets whether to use SSL.

SslVerifyCertificate

Gets whether to verify SSL certificates.

Tls

Gets whether to use TLS.

TlsDisableCertificateRevocationCheck

Get whether or not certificate revocation checking is disabled during the TLS handshake.

TlsInsecure

Gets whether to relax TLS constraints as much as possible.

Username

Gets the username.

UuidRepresentation

Gets the UUID representation.

W

Gets the w value of the write concern.

WTimeout

Gets the wtimeout value of the write concern.

WaitQueueMultiple

Gets the wait queue multiple.

WaitQueueSize

Gets the wait queue size.

WaitQueueTimeout

Gets the wait queue timeout.

Methods

GetOption(string)

Gets the option.

Resolve(bool, CancellationToken)

Resolves a connection string. If the connection string indicates more information is available in the DNS system, it will acquire that information as well.

Resolve(CancellationToken)

Resolves a connection string. If the connection string indicates more information is available in the DNS system, it will acquire that information as well.

ResolveAsync(bool, CancellationToken)

Resolves a connection string. If the connection string indicates more information is available in the DNS system, it will acquire that information as well.

ResolveAsync(CancellationToken)

Resolves a connection string. If the connection string indicates more information is available in the DNS system, it will acquire that information as well.

ToString()