private void AddBaseTypesForAffectedTypes()
 {
     foreach (var affectedClass in AffectedTypes.ToList())
     {
         ClassDiagram.GetBaseTypes(affectedClass).ToList().ForEach(baseType =>
         {
             AffectedTypes.Add(baseType);
             Edges.Add(new AffectedEdge(affectedClass, baseType, Edge.Inheritance));
         });
     }
 }
 private void AddSubTypesOverridingMethodsInAffectedTypes()
 {
     foreach (var affectedClass in AffectedTypes.ToList())
     {
         ClassDiagram.GetSubTypesOverridingAnyMethodsIn(affectedClass).ToList().ForEach(type =>
         {
             AffectedTypes.Add(type);
             Edges.Add(new AffectedEdge(type, affectedClass, Edge.IndirectSubtype));
         });
     }
 }
        private void AddAffectedMethodsForChangedStaticConstructors()
        {
            var affectedTypes = MethodChanges
                                .Where(c => c.Method.IsStatic && c.Method.IsConstructor)
                                .Select(change => change.Method.DeclaringType.FullName).ToList();

            foreach (var type in affectedTypes)
            {
                var resolvedType = ClassDiagram.ResolveType(type);
                foreach (var method in resolvedType.Methods)
                {
                    MethodChanges.Add(new MethodChange(method, Change.Modified));
                }
            }
        }
        private void AddTypesUsingAnyAffectedType()
        {
            foreach (var invoke in Coverage.SelectMany(e => e.Value).Where(invoke => !(invoke.From is TestMethod)))
            {
                if (IsInAffectedClass(invoke.Target) && IsAffectedMethod(invoke.Target) && !IsInAffectedClass(invoke.From))
                {
                    var from = ClassDiagram.ResolveType(invoke.From.TypeName);
                    if (from != null)
                    {
                        var fromMethod = from.Methods.First(m => m.Name.Equals(invoke.From.Name));
                        var target     = ClassDiagram.ResolveType(invoke.Target.TypeName);

                        AffectedTypes.Add(from);
                        Edges.Add(new AffectedEdge(from, target, Edge.Use));
                        MethodChanges.Add(new MethodChange(fromMethod, Change.Using));
                    }
                }
            }
        }