Пример #1
0
        private bool IsEqual(SchemaDifference difference, DiffEntry diffEntry)
        {
            bool result = true;
            // Create a diff entry from difference and check if it matches the diff entry passed
            DiffEntry entryFromDifference = SchemaCompareUtils.CreateDiffEntry(difference, null);

            System.Reflection.PropertyInfo[] properties = diffEntry.GetType().GetProperties();
            foreach (var prop in properties)
            {
                result = result &&
                         ((prop.GetValue(diffEntry) == null &&
                           prop.GetValue(entryFromDifference) == null) ||
                          prop.GetValue(diffEntry).SafeToString().Equals(prop.GetValue(entryFromDifference).SafeToString()));
            }

            return(result);
        }
        private bool IsEqual(SchemaDifference difference, DiffEntry diffEntry)
        {
            bool result = true;
            // Create a diff entry from difference and check if it matches the diff entry passed
            DiffEntry entryFromDifference = SchemaCompareUtils.CreateDiffEntry(difference, null);

            System.Reflection.PropertyInfo[] properties = diffEntry.GetType().GetProperties();
            foreach (var prop in properties)
            {
                // Don't need to check if included is the same when verifying if the difference is equal
                if (prop.Name != "Included")
                {
                    if (!((prop.GetValue(diffEntry) == null &&
                           prop.GetValue(entryFromDifference) == null) ||
                          prop.GetValue(diffEntry).SafeToString().Equals(prop.GetValue(entryFromDifference).SafeToString())))
                    {
                        return(false);
                    }
                }
            }

            return(result);
        }