Esempio n. 1
0
        public void Verify()
        {
            this.Categorize();

            foreach (EvolutionChange evolutionChange in this)
            {
                evolutionChange.Verify();
                if (!ChangesLookupManager.MayRequireRevalidation(evolutionChange))
                {
                    Debug.Assert(!evolutionChange.InvalidatesAttributes);
                    Debug.Assert(!evolutionChange.InvalidatesContent);
                }
            }

            foreach (KeyValuePair <PSMElement, List <EvolutionChange> > kvp in this.changesByTarget)
            {
                List <EvolutionChange> changes = kvp.Value;
                int ca = changes.Count(c => c.Element == kvp.Key && c.EditType == EEditType.Addition);
                int cm = changes.Count(c => c.Element == kvp.Key && c.EditType == EEditType.Migratory);
                int cr = changes.Count(c => c.Element == kvp.Key && c.EditType == EEditType.Removal);
                Debug.Assert(ca + cr <= 1);
                Debug.Assert(cm == 0 || ca + cr == 0);
            }
        }
Esempio n. 2
0
 private void RemoveChangesNotRequiringRevalidation()
 {
     this.Where(c => !ChangesLookupManager.MayRequireRevalidation(c)).ToList();
     this.RemoveAll(c => !ChangesLookupManager.MayRequireRevalidation(c));
 }