Click or drag to resize

MongoUrl Class

Represents an immutable URL style connection string. See also MongoUrlBuilder.
Inheritance Hierarchy
SystemObject
  MongoDB.DriverMongoUrl

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax
[SerializableAttribute]
[TypeConverterAttribute(typeof(MongoUrlTypeConverter))]
public class MongoUrl : IEquatable<MongoUrl>

The MongoUrl type exposes the following members.

Constructors
  NameDescription
Public methodMongoUrl
Creates a new instance of MongoUrl.
Top
Properties
  NameDescription
Public propertyAllowInsecureTls
Gets whether to relax TLS constraints as much as possible.
Public propertyApplicationName
Gets the application name.
Public propertyAuthenticationMechanism
Gets the authentication mechanism.
Public propertyAuthenticationMechanismProperties
Gets the authentication mechanism properties.
Public propertyAuthenticationSource
Gets the authentication source.
Public propertyCompressors
Gets the compressors.
Public propertyComputedWaitQueueSize Obsolete.
Gets the actual wait queue size (either WaitQueueSize or WaitQueueMultiple x MaxConnectionPoolSize).
Public propertyConnectionMode Obsolete.
Gets the connection mode.
Public propertyConnectionModeSwitch Obsolete.
Gets the connection mode switch.
Public propertyConnectTimeout
Gets the connect timeout.
Public propertyDatabaseName
Gets the optional database name.
Public propertyDirectConnection
Gets the direct connection.
Public propertyFSync
Gets the FSync component of the write concern.
Public propertyGuidRepresentation Obsolete.
Gets the representation to use for Guids.
Public propertyHasAuthenticationSettings
Gets a value indicating whether this instance has authentication settings.
Public propertyHeartbeatInterval
Gets the heartbeat interval.
Public propertyHeartbeatTimeout
Gets the heartbeat timeout.
Public propertyIPv6
Gets a value indicating whether to use IPv6.
Public propertyIsResolved
Gets a value indicating whether a connection string with scheme MongoDBPlusSrv has been resolved.
Public propertyJournal
Gets the Journal component of the write concern.
Public propertyLoadBalanced
Gets or sets whether load balanced mode is used.
Public propertyLocalThreshold
Gets the local threshold.
Public propertyMaxConnecting
Gets the maximum concurrently connecting connections.
Public propertyMaxConnectionIdleTime
Gets the max connection idle time.
Public propertyMaxConnectionLifeTime
Gets the max connection life time.
Public propertyMaxConnectionPoolSize
Gets the max connection pool size.
Public propertyMinConnectionPoolSize
Gets the min connection pool size.
Public propertyPassword
Gets the password.
Public propertyReadConcernLevel
Gets the read concern level.
Public propertyReadPreference
Gets the read preference.
Public propertyReplicaSetName
Gets the name of the replica set.
Public propertyRetryReads
Gets whether reads will be retried.
Public propertyRetryWrites
Gets whether writes will be retried.
Public propertyScheme
Gets the connection string scheme.
Public propertyServer
Gets the address of the server (see also Servers if using more than one address).
Public propertyServers
Gets the list of server addresses (see also Server if using only one address).
Public propertyServerSelectionTimeout
Gets the server selection timeout.
Public propertySocketTimeout
Gets the socket timeout.
Public propertySrvMaxHosts
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.
Public propertyTlsDisableCertificateRevocationCheck
Gets whether or not to disable checking certificate revocation status during the TLS handshake.
Public propertyUrl
Gets the URL (in canonical form).
Public propertyUsername
Gets the username.
Public propertyUseSsl Obsolete.
Gets a value indicating whether to use SSL.
Public propertyUseTls
Gets a value indicating whether to use TLS.
Public propertyVerifySslCertificate Obsolete.
Gets a value indicating whether to verify an SSL certificate.
Public propertyW
Gets the W component of the write concern.
Public propertyWaitQueueMultiple Obsolete.
Gets the wait queue multiple (the actual wait queue size will be WaitQueueMultiple x MaxConnectionPoolSize).
Public propertyWaitQueueSize Obsolete.
Gets the wait queue size.
Public propertyWaitQueueTimeout
Gets the wait queue timeout.
Public propertyWTimeout
Gets the WTimeout component of the write concern.
Top
Methods
  NameDescription
Public methodStatic memberClearCache
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.
Public methodStatic memberCreate
Creates an instance of MongoUrl (might be an existing existence if the same URL has been used before).
Public methodEquals(Object)
Compares two MongoUrls.
(Overrides ObjectEquals(Object).)
Public methodEquals(MongoUrl)
Compares two MongoUrls.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetCredential
Gets the credential.
Public methodGetHashCode
Gets the hash code.
(Overrides ObjectGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetWriteConcern
Returns a WriteConcern value based on this instance's settings and a default enabled value.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodResolve(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.
Public methodResolve(Boolean, 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.
Public methodResolveAsync(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.
Public methodResolveAsync(Boolean, 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.
Public methodToString
Returns the canonical URL based on the settings in this MongoUrlBuilder.
(Overrides ObjectToString.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Compares two MongoUrls.
Public operatorStatic memberInequality
Compares two MongoUrls.
Top
Extension Methods
  NameDescription
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
See Also