private static IEnumerable <NamespaceMetricsReport> GetOtherNamespacesInSameCycleIn(this NamespaceMetricsWithTypeMetrics namespaceWithTypes, StronglyConntectedComponents <NamespaceMetricsWithTypeMetrics> cycles) { return(from n in cycles.OfVertex(namespaceWithTypes).Vertices select n.Namespace); }
private static IEnumerable <TypeCycle> GetViewModels(PreparedMetricsReport metrics, StronglyConntectedComponents <TypeMetricsReport> cycles) { return(from cycle in cycles.All where cycle.VertexCount > 1 orderby cycle.VertexCount descending select new TypeCycle { DisplayName = string.Format("{0} classes", cycle.VertexCount), TypesInCycle = from type in cycle.Vertices select new Type { DisplayName = type.FullName, ReferencedTypes = from referencedType in type.InterestingDirectDependencies.Intersect(cycles.OfVertex(type).Vertices.Select(t => t.FullName)) where type.FullName != referencedType select new TypeReferenceVM(metrics, type, referencedType) } }); }
private static IEnumerable<NamespaceMetricsReport> GetOtherNamespacesInSameCycleIn(this NamespaceMetricsWithTypeMetrics namespaceWithTypes, StronglyConntectedComponents<NamespaceMetricsWithTypeMetrics> cycles) { return from n in cycles.OfVertex(namespaceWithTypes).Vertices select n.Namespace; }