// constructors /// <summary> /// Creates a new instance of MongoClientSettings. Usually you would use a connection string instead. /// </summary> public MongoClientSettings() { _applicationName = null; _connectionMode = ConnectionMode.Automatic; _connectTimeout = MongoDefaults.ConnectTimeout; _credentials = new MongoCredentialStore(new MongoCredential[0]); _guidRepresentation = MongoDefaults.GuidRepresentation; _heartbeatInterval = ServerSettings.DefaultHeartbeatInterval; _heartbeatTimeout = ServerSettings.DefaultHeartbeatTimeout; _ipv6 = false; _localThreshold = MongoDefaults.LocalThreshold; _maxConnectionIdleTime = MongoDefaults.MaxConnectionIdleTime; _maxConnectionLifeTime = MongoDefaults.MaxConnectionLifeTime; _maxConnectionPoolSize = MongoDefaults.MaxConnectionPoolSize; _minConnectionPoolSize = MongoDefaults.MinConnectionPoolSize; _readConcern = ReadConcern.Default; _readEncoding = null; _readPreference = ReadPreference.Primary; _replicaSetName = null; _servers = new List <MongoServerAddress> { new MongoServerAddress("localhost") }; _serverSelectionTimeout = MongoDefaults.ServerSelectionTimeout; _socketTimeout = MongoDefaults.SocketTimeout; _sslSettings = null; _useSsl = false; _verifySslCertificate = true; _waitQueueSize = MongoDefaults.ComputedWaitQueueSize; _waitQueueTimeout = MongoDefaults.WaitQueueTimeout; _writeConcern = WriteConcern.Acknowledged; _writeEncoding = null; }
// constructors /// <summary> /// Creates a new instance of MongoClientSettings. Usually you would use a connection string instead. /// </summary> public MongoClientSettings() { _connectionMode = ConnectionMode.Automatic; _connectTimeout = MongoDefaults.ConnectTimeout; _credentials = new MongoCredentialStore(new MongoCredential[0]); _guidRepresentation = MongoDefaults.GuidRepresentation; _ipv6 = false; _maxConnectionIdleTime = MongoDefaults.MaxConnectionIdleTime; _maxConnectionLifeTime = MongoDefaults.MaxConnectionLifeTime; _maxConnectionPoolSize = MongoDefaults.MaxConnectionPoolSize; _minConnectionPoolSize = MongoDefaults.MinConnectionPoolSize; _operationTimeout = Timeout.InfiniteTimeSpan; _readEncoding = null; _readPreference = ReadPreference.Primary; _replicaSetName = null; _secondaryAcceptableLatency = MongoDefaults.SecondaryAcceptableLatency; _servers = new List <MongoServerAddress> { new MongoServerAddress("localhost") }; _socketTimeout = MongoDefaults.SocketTimeout; _sslSettings = null; _useSsl = false; _verifySslCertificate = true; _waitQueueSize = MongoDefaults.ComputedWaitQueueSize; _waitQueueTimeout = MongoDefaults.WaitQueueTimeout; _writeConcern = WriteConcern.Acknowledged; _writeEncoding = null; }
// constructors /// <summary> /// Creates a new instance of MongoClientSettings. Usually you would use a connection string instead. /// </summary> public MongoClientSettings() { _allowInsecureTls = false; _applicationName = null; _autoEncryptionOptions = null; _compressors = new CompressorConfiguration[0]; #pragma warning disable CS0618 // Type or member is obsolete _connectionMode = ConnectionMode.Automatic; _connectionModeSwitch = ConnectionModeSwitch.NotSet; #pragma warning restore CS0618 // Type or member is obsolete _connectTimeout = MongoDefaults.ConnectTimeout; _credentials = new MongoCredentialStore(new MongoCredential[0]); _directConnection = null; #pragma warning disable 618 if (BsonDefaults.GuidRepresentationMode == GuidRepresentationMode.V2) { _guidRepresentation = MongoDefaults.GuidRepresentation; } #pragma warning restore 618 _heartbeatInterval = ServerSettings.DefaultHeartbeatInterval; _heartbeatTimeout = ServerSettings.DefaultHeartbeatTimeout; _ipv6 = false; _localThreshold = MongoDefaults.LocalThreshold; _maxConnectionIdleTime = MongoDefaults.MaxConnectionIdleTime; _maxConnectionLifeTime = MongoDefaults.MaxConnectionLifeTime; _maxConnectionPoolSize = MongoDefaults.MaxConnectionPoolSize; _minConnectionPoolSize = MongoDefaults.MinConnectionPoolSize; _readConcern = ReadConcern.Default; _readEncoding = null; _readPreference = ReadPreference.Primary; _replicaSetName = null; _retryReads = true; _retryWrites = true; _scheme = ConnectionStringScheme.MongoDB; _sdamLogFilename = null; _servers = new List<MongoServerAddress> { new MongoServerAddress("localhost") }; _serverSelectionTimeout = MongoDefaults.ServerSelectionTimeout; _socketTimeout = MongoDefaults.SocketTimeout; _sslSettings = null; _useTls = false; #pragma warning disable 618 _waitQueueSize = MongoDefaults.ComputedWaitQueueSize; #pragma warning restore 618 _waitQueueTimeout = MongoDefaults.WaitQueueTimeout; _writeConcern = WriteConcern.Acknowledged; _writeEncoding = null; }
// constructors /// <summary> /// Creates a new instance of MongoServerSettings. Usually you would use a connection string instead. /// </summary> public MongoServerSettings() { _allowInsecureTls = false; _applicationName = null; _compressors = new CompressorConfiguration[0]; _connectionMode = ConnectionMode.Automatic; _connectTimeout = MongoDefaults.ConnectTimeout; _credentials = new MongoCredentialStore(new MongoCredential[0]); _guidRepresentation = MongoDefaults.GuidRepresentation; _heartbeatInterval = ServerSettings.DefaultHeartbeatInterval; _heartbeatTimeout = ServerSettings.DefaultHeartbeatTimeout; _ipv6 = false; _localThreshold = MongoDefaults.LocalThreshold; _maxConnectionIdleTime = MongoDefaults.MaxConnectionIdleTime; _maxConnectionLifeTime = MongoDefaults.MaxConnectionLifeTime; _maxConnectionPoolSize = MongoDefaults.MaxConnectionPoolSize; _minConnectionPoolSize = MongoDefaults.MinConnectionPoolSize; _operationTimeout = MongoDefaults.OperationTimeout; _readConcern = ReadConcern.Default; _readEncoding = null; _readPreference = ReadPreference.Primary; _replicaSetName = null; _retryReads = true; _retryWrites = true; _scheme = ConnectionStringScheme.MongoDB; _sdamLogFilename = null; _servers = new List <MongoServerAddress> { new MongoServerAddress("localhost") }; _serverSelectionTimeout = MongoDefaults.ServerSelectionTimeout; _socketTimeout = MongoDefaults.SocketTimeout; _sslSettings = null; _useTls = false; _waitQueueSize = MongoDefaults.ComputedWaitQueueSize; _waitQueueTimeout = MongoDefaults.WaitQueueTimeout; _writeConcern = WriteConcern.Unacknowledged; _writeEncoding = null; }
// public methods /// <summary> /// Determines whether the specified <see cref="MongoCredentialStore" /> is equal to this instance. /// </summary> /// <param name="obj">The <see cref="MongoCredentialStore" /> to compare with this instance.</param> /// <returns> /// <c>true</c> if the specified <see cref="MongoCredentialStore" /> is equal to this instance; otherwise, <c>false</c>. /// </returns> public bool Equals(MongoCredentialStore obj) { return(Equals((object)obj)); // handles obj == null correctly }