public new bool Equals(object x, object y)
        {
            if (x is ComplexModelSource source && y is ComplexModelDestination destination)
            {
                var comparer = new FlatModelComparer();

                return(comparer.Equals(x, y) && comparer.Equals(source.ParentInfo, destination.ParentInfo));
            }

            throw new NotImplementedException();
        }
Exemple #2
0
        public bool Equals(object x, object y)
        {
            if (x is EnumerableModelSource source && y is EnumerableModelDestination destination)
            {
                var complexComparer = new ComplexModelComparer();

                var flatComparer = new FlatModelComparer();

                return(complexComparer.Equals(x, y) &&
                       source.CountOfAnccesstors.Zip(destination.CountOfAnccesstors, (i, j) => i == j).All(b => b) &&
                       source.Anccesstors.Zip(destination.Anccesstors, (i, j) => flatComparer.Equals(i, j)).All(b => b));
            }

            throw new NotImplementedException();
        }