Class MongoUrl
Represents an immutable URL style connection string. See also MongoUrlBuilder.
[Serializable]
[TypeConverter(typeof(MongoUrlTypeConverter))]
public class MongoUrl : IEquatable<MongoUrl>
- Inheritance
-
MongoUrl
- Implements
- Inherited Members
Constructors
- MongoUrl(string)
Creates a new instance of MongoUrl.
Properties
- AllowInsecureTls
Gets whether to relax TLS constraints as much as possible.
- ApplicationName
Gets the application name.
- AuthenticationMechanism
Gets the authentication mechanism.
- AuthenticationMechanismProperties
Gets the authentication mechanism properties.
- AuthenticationSource
Gets the authentication source.
- Compressors
Gets the compressors.
- ComputedWaitQueueSize
Gets the actual wait queue size (either WaitQueueSize or WaitQueueMultiple x MaxConnectionPoolSize).
- ConnectTimeout
Gets the connect timeout.
- ConnectionMode
Gets the connection mode.
- ConnectionModeSwitch
Gets the connection mode switch.
- DatabaseName
Gets the optional database name.
- DirectConnection
Gets the direct connection.
- FSync
Gets the FSync component of the write concern.
- GuidRepresentation
Gets the representation to use for Guids.
- HasAuthenticationSettings
Gets a value indicating whether this instance has authentication settings.
- HeartbeatInterval
Gets the heartbeat interval.
- HeartbeatTimeout
Gets the heartbeat timeout.
- IPv6
Gets a value indicating whether to use IPv6.
- IsResolved
Gets a value indicating whether a connection string with scheme MongoDBPlusSrv has been resolved.
- Journal
Gets the Journal component of the write concern.
- LoadBalanced
Gets or sets whether load balanced mode is used.
- LocalThreshold
Gets the local threshold.
- MaxConnecting
Gets the maximum concurrently connecting connections.
- MaxConnectionIdleTime
Gets the max connection idle time.
- MaxConnectionLifeTime
Gets the max connection life time.
- MaxConnectionPoolSize
Gets the max connection pool size.
- MinConnectionPoolSize
Gets the min connection pool size.
- Password
Gets the password.
- ReadConcernLevel
Gets the read concern level.
- ReadPreference
Gets the read preference.
- ReplicaSetName
Gets the name of the replica set.
- RetryReads
Gets whether reads will be retried.
- RetryWrites
Gets whether writes will be retried.
- Scheme
Gets the connection string scheme.
- Server
Gets the address of the server (see also Servers if using more than one address).
- ServerMonitoringMode
Gets the server monitoring mode to use.
- ServerSelectionTimeout
Gets the server selection timeout.
- Servers
Gets the list of server addresses (see also Server if using only one address).
- 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.
- TlsDisableCertificateRevocationCheck
Gets whether or not to disable checking certificate revocation status during the TLS handshake.
- Url
Gets the URL (in canonical form).
- UseSsl
Gets a value indicating whether to use SSL.
- UseTls
Gets a value indicating whether to use TLS.
- Username
Gets the username.
- VerifySslCertificate
Gets a value indicating whether to verify an SSL certificate.
- W
Gets the W component of the write concern.
- WTimeout
Gets the WTimeout component of the write concern.
- WaitQueueMultiple
Gets the wait queue multiple (the actual wait queue size will be WaitQueueMultiple x MaxConnectionPoolSize).
- WaitQueueSize
Gets the wait queue size.
- WaitQueueTimeout
Gets the wait queue timeout.
Methods
- ClearCache()
Clears the URL cache. When a URL is parsed it is stored in the cache so that it doesn't have to be parsed again. There is rarely a need to call this method.
- Create(string)
Creates an instance of MongoUrl (might be an existing existence if the same URL has been used before).
- Equals(MongoUrl)
Compares two MongoUrls.
- Equals(object)
Compares two MongoUrls.
- GetCredential()
Gets the credential.
- GetHashCode()
Gets the hash code.
- GetWriteConcern(bool)
Returns a WriteConcern value based on this instance's settings and a default enabled value.
- 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()
Returns the canonical URL based on the settings in this MongoUrlBuilder.
Operators
- operator ==(MongoUrl, MongoUrl)
Compares two MongoUrls.
- operator !=(MongoUrl, MongoUrl)
Compares two MongoUrls.