/// <summary> /// Compares two objects of the same type, and returns a list of CompareResult objects, /// that contain the changes (differences) between the two data contracts. /// Returns empty list if the objects are identical public static IEnumerable <CompareResult> CompareTo <TSource>(this TSource source, TSource compareTo) { return(ObjectComparer.CompareTo <TSource>(source, compareTo)); }
/// <summary> /// Compares two DataContracts of the same type and returns true if all property values on both objects /// are identical, including all collections and base properties /// </summary> /// <typeparam name="TSource"></typeparam> /// <param name="source"></param> /// <param name="compareTo"></param> /// <returns></returns> public static bool DeepEquals <TSource>(this TSource source, TSource comparedTo) { return(ObjectComparer.DeepEquals <TSource>(source, comparedTo)); }