MongoDB.Driver.MongoServerInstance.ServerInformation.IsDifferentFrom C# (CSharp) Method

IsDifferentFrom() public method

public IsDifferentFrom ( ServerInformation other ) : bool
other ServerInformation
return bool
            public bool IsDifferentFrom(ServerInformation other)
            {
                if (InstanceType != other.InstanceType)
                {
                    return true;
                }

                if (IsPrimary != other.IsPrimary)
                {
                    return true;
                }

                if (IsSecondary != other.IsSecondary)
                {
                    return true;
                }

                if (IsPassive != other.IsPassive)
                {
                    return true;
                }

                if (IsArbiter != other.IsArbiter)
                {
                    return true;
                }

                if (MaxDocumentSize != other.MaxDocumentSize)
                {
                    return true;
                }

                if (MaxMessageLength != other.MaxMessageLength)
                {
                    return true;
                }

                if ((ReplicaSetInformation == null && other.ReplicaSetInformation != null) || (ReplicaSetInformation != other.ReplicaSetInformation))
                {
                    return true;
                }

                return false;
            }
        }
MongoServerInstance.ServerInformation