public static void DoWork_Version4() { var firstObj = new PiContract(); var secondObj = new PiContract(); secondObj.BeginOfContract = new DateTime(2015, 1, 1); var differentiator = new Diff.Version_4.GenericComparer <PiContract>(new Diff.Version_4.BasicComparisionStrategy <PiContract>()); var differences = differentiator.GetDifferences(firstObj, secondObj).ToList(); }
public List <Diff.Version_4.MemberInformation> GetDifferencesForContracts(IEnumerable <Tuple <PiContract, PiContract> > contracts) { var differentiator = new Diff.Version_4.GenericComparer <PiContract>(new Diff.Version_4.BasicComparisionStrategy <PiContract>()); var result = new List <Diff.Version_4.MemberInformation>(); Parallel.ForEach(contracts, contractsToCompare => { var differences = differentiator.GetDifferences(contractsToCompare.Item1, contractsToCompare.Item2).ToList(); lock (lockMe) { result.AddRange(differences); } }); return(result); }