Пример #1
0
        public bool Equals(CustomCollectionObject other)
        {
            var dictionaryComparer = new DictionaryComparer <string, int>();

            return(((_innerStorage == null && other._innerStorage == null) || dictionaryComparer.Equals(_innerStorage, other._innerStorage)) &&
                   _a == other._a &&
                   _z == other._z
                   );
        }
Пример #2
0
        public bool Equals(ComplexObject other)
        {
            var dictionaryComparer = new DictionaryComparer <int, CustomerObject>();

            return(Id == other.Id &&
                   (Department == null && other.Department == null) || Department.Equals(other.Department) &&
                   IsEnabled == other.IsEnabled &&
                   ((NumbersList == null && other.NumbersList == null) || NumbersList.SequenceEqual(other.NumbersList)) &&
                   ((Customers == null && other.Customers == null) || dictionaryComparer.Equals(Customers, other.Customers))
                   );
        }