public override object Clone()
        {
            FileState clone = new FileState();

            foreach (var table in Tables)
            {
                clone.Tables.Add((IFileDataTable)table.Clone());
            }
            clone.Store   = Store;
            clone.Version = Version;
            return(clone);
        }
        public static ChangeSet EvaluateDiff(FileState state1, FileState state2)
        {
            ChangeSet changeSet = new ChangeSet();

            foreach (var table1 in state1.Tables)
            {
                Type memberType = table1.MemberType;
                var  table2     = state2.GetMatchingTable(table1);
                if (table2 == null)
                {
                    throw new InvalidDataException("Could not find a matching table. Aborting the diff operation.");
                }
                changeSet = ChangeSet.Merge(changeSet, table1.EvaluateDiff(table2));
            }
            return(changeSet);
        }