public static MetricsReport MetricsReport(IEnumerable <NamespaceMetricsReport> namespaceMetrics) { var metricsReport = new MetricsReport(); foreach (var namespaceMetric in namespaceMetrics) { metricsReport.AddNamespaceReport(NamespaceMetrics(namespaceMetric, Enumerable.Empty <TypeMetricsReport>())); } return(metricsReport); }
private static void SetNamespacesWithCyclicDependencies(this MetricsReport metrics) { var cycles = CyclicDependencies.In(metrics.GraphOfNamespaces); foreach (var namespaceWithTypes in metrics.GraphOfNamespaces.Vertices) { metrics.AddNamespaceReport(namespaceWithTypes); namespaceWithTypes.Namespace.CyclicDependencies = CyclicDependencies.Of(namespaceWithTypes, cycles); } }