Beispiel #1
0
 public static IEnumerable <IDiff <Person> > Diff(this IEnumerable <Person> people, IEnumerable <Person> others)
 {
     return(Differ.Differences(
                people,
                others,
                (x) => (x),
                (x) => (x.FirstName, x.LastName),
                (x, y) => (x.FirstName == y.FirstName && x.LastName == y.LastName && x.Age == y.Age && x.Dependents.Diff(y.Dependents).AllSame())));
 }
        public static IEnumerable <Diff <TItem> > Differences <TObject, TItem, TId>(TObject left, TObject right, Func <TObject, IEnumerable <TItem> > collectionSelector, Func <TItem, TId> idOf, Func <TItem, TItem, bool> equals)
        {
            var differences = Differ.Differences(left, right, collectionSelector, idOf, equals);

            return(differences.Select(diff => new Diff <TItem>(diff)));
        }