public override bool Equals()

in clicache/integration-test2/AutoSerializationTests.cs [1139:1252]


    public override bool Equals(object obj)
    {
      if (obj == null)
        return false;
      if (obj == this)
        return true;

      var other = obj as SerializeAllTypes;

      if (other == null)
        return false;

      if (stringVal == other.stringVal
          && stringArray.SequenceEqual(other.stringArray)

          && identity == other.identity

          && charVal == other.charVal
          && charArray.SequenceEqual(other.charArray)

          && boolVal == other.boolVal
          && boolArray.SequenceEqual(other.boolArray)

          && byteVal == other.byteVal
          && byteArray.SequenceEqual(other.byteArray)

          && sbyteVal == other.sbyteVal
          && sbyteArray.SequenceEqual(other.sbyteArray)

          && shortVal == other.shortVal
          && ushortVal == other.ushortVal
          && shortArray.SequenceEqual(other.shortArray)
          && ushortArray.SequenceEqual(other.ushortArray)

          && intVal == other.intVal
          && uintVal == other.uintVal
          && intArray.SequenceEqual(other.intArray)
          && uintArray.SequenceEqual(other.uintArray)

          && longVal == other.longVal
          && ulongVal == other.ulongVal
          && longArray.SequenceEqual(other.longArray)
          && ulongArray.SequenceEqual(other.ulongArray)

          && floatVal == other.floatVal
          && floatArray.SequenceEqual(other.floatArray)

          && doubleVal == other.doubleVal
          && doubleArray.SequenceEqual(other.doubleArray)

          && dateTimeVal == other.dateTimeVal
          && dateTimeArray.SequenceEqual(other.dateTimeArray)

          && s1 == other.s1
          && s2 == other.s2
          && colorVal == other.colorVal
          && guid == other.guid
          && decimalVal == other.decimalVal)
      {
        var ret = nestedObject.Equals(other.nestedObject);

        if (ret)
        {
          if (_addressList.Count == 10 &&
              _addressList.Count == other._addressList.Count
          )
          {
            for (var i = 0; i < _addressList.Count; i++)
            {
              ret = _addressList[i].Equals(other._addressList[i]);
              if (!ret)
                return false;
            }

            if (_hashTable.Count != other._hashTable.Count)
              return false;

            foreach (DictionaryEntry de in _hashTable)
            {
              var otherHe = other._hashTable[de.Key];
              ret = de.Value.Equals(otherHe);
              if (!ret)
                return false;
            }

            if (_stack.Count != other._stack.Count)
              return false;
            foreach (Object o in _stack)
            {
              var otherO = other._stack.Pop();
              ret = o.Equals(otherO);
              if (!ret)
                return false;
            }

            if (_queue.Count != other._queue.Count)
              return false;
            foreach (Object o in _queue)
            {
              var otherO = other._queue.Dequeue();
              ret = o.Equals(otherO);
              if (!ret)
                return false;
            }

            if (!_address.Equals(other._address))
              return false;

            return base.Equals(other);
          }
        }
      }
      return false;
    }