private void OutputHotspots(MetricsHotspots hotspots) { Output("Hotspots"); Output(String.Format("\tCyclomaticComplexity:\t\t\t{0}", string.Join(", ", hotspots.OfCyclomaticComplexity().Select(h => h.Signature)))); Output(String.Format("\tMethodLength:\t\t\t\t{0}", string.Join(", ", hotspots.OfMethodLength().Select(h => h.Signature)))); Output(String.Format("\tClassSize:\t\t\t\t{0}", string.Join(", ", hotspots.OfClassSize().Select(h => h.FullName)))); Output(String.Format("\tNumberOfNonStaticPublicFields:\t\t{0}", string.Join(", ", hotspots.OfNumberOfNonStaticPublicFields().Select(h => h.FullName)))); Output(String.Format("\tCumulativeComponentDependency ({0}):\t{1}", GetCcdLimit(hotspots), string.Join(", ", hotspots.OfCumulativeComponentDependency().Select(h => h.FullName)))); Output(String.Format("\tNamespacesWithCyclicDependencies:\t{0}", string.Join(", ", hotspots.OfNamespacesInCycle().Select(h => h.Name)))); Output(); }
private int GetCcdLimit(MetricsHotspots hotspots) { return RatingFunctions.Limits.CumulativeComponentDependency(hotspots.Metrics.CommonKnowledge); }