MongoDB.Driver.MongoServerSettings.Equals C# (CSharp) 메소드

Equals() 공개 메소드

Compares two MongoServerSettings instances.
public Equals ( object obj ) : bool
obj object The other instance.
리턴 bool
        public override bool Equals(object obj)
        {
            var rhs = obj as MongoServerSettings;
            if (rhs == null)
            {
                return false;
            }
            else
            {
                if (_isFrozen && rhs._isFrozen)
                {
                    return _frozenStringRepresentation == rhs._frozenStringRepresentation;
                }
                else
                {
                    return
                        _connectionMode == rhs._connectionMode &&
                        _connectTimeout == rhs._connectTimeout &&
                        _credentialsStore.Equals(rhs._credentialsStore) &&
                        _defaultCredentials == rhs._defaultCredentials &&
                        _guidRepresentation == rhs._guidRepresentation &&
                        _ipv6 == rhs._ipv6 &&
                        _maxConnectionIdleTime == rhs._maxConnectionIdleTime &&
                        _maxConnectionLifeTime == rhs._maxConnectionLifeTime &&
                        _maxConnectionPoolSize == rhs._maxConnectionPoolSize &&
                        _minConnectionPoolSize == rhs._minConnectionPoolSize &&
                        _readPreference == rhs._readPreference &&
                        _replicaSetName == rhs._replicaSetName &&
                        _secondaryAcceptableLatency == rhs._secondaryAcceptableLatency &&
                        _servers.SequenceEqual(rhs._servers) &&
                        _socketTimeout == rhs._socketTimeout &&
                        _useSsl == rhs._useSsl &&
                        _verifySslCertificate == rhs._verifySslCertificate &&
                        _waitQueueSize == rhs._waitQueueSize &&
                        _waitQueueTimeout == rhs._waitQueueTimeout &&
                        _writeConcern == rhs._writeConcern;
                }
            }
        }