示例#1
0
文件: Analyzer.cs 项目: cessor/MTSS12
 private void OutputNamespaceMetricsReport(NamespaceMetricsReport namespaceMetrics)
 {
     OutputSeperator();
     Output(String.Format("Name:\t\t{0}", namespaceMetrics.Name));
     Output(String.Format("NumberOfNamespacesInCycle:\t{0}", namespaceMetrics.NumberOfNamespacesInCycle));
     Output();
 }
示例#2
0
 public static IEnumerable<TypeMetricsReport> TypesOfNamespace(this MetricsReport metrics, NamespaceMetricsReport namespaceMetrics)
 {
     return metrics.TypesOf(namespaceMetrics);
 }
示例#3
0
 private IEnumerable<OutOfNamespaceReference> ReferencesOutOf(NamespaceMetricsReport currentNamespace, IEnumerable<NamespaceMetricsReport> to)
 {
     return from typeReferences in AllTypesWithReferencesIn(currentNamespace)
            from crossReference in typeReferences.Referencing(to)
            select crossReference;
 }
示例#4
0
 private IEnumerable<OutgoingTypeReferences> AllTypesWithReferencesIn(NamespaceMetricsReport currentNamespace)
 {
     return from type in metrics.TypesOfNamespace(currentNamespace)
            select new OutgoingTypeReferences(metrics, type);
 }
示例#5
0
 public static IEnumerable <TypeMetricsReport> TypesOfNamespace(this MetricsReport metrics, NamespaceMetricsReport namespaceMetrics)
 {
     return(metrics.TypesOf(namespaceMetrics));
 }
示例#6
0
 public HotspotNamespaceInCycle(NamespaceMetricsReport namespaceReport, MetricsReport metrics)
     : base(namespaceReport, metrics)
 {
 }
示例#7
0
 internal IEnumerable<TypeMetricsReport> TypesOf(NamespaceMetricsReport namespaceMetrics)
 {
     return namespaceReports[namespaceMetrics.Name].Types;
 }
示例#8
0
 internal IEnumerable <TypeMetricsReport> TypesOf(NamespaceMetricsReport namespaceMetrics)
 {
     return(namespaceReports[namespaceMetrics.Name].Types);
 }
示例#9
0
 public static bool NumberOfNamespacesInCycle(int nonic)
 {
     var metrics = new NamespaceMetricsReport { CyclicDependencies = Create.Default<string>(nonic) };
     metrics.CommonKnowledge = new CommonReportKnowledge(0, 0, 1, 0);
     return metrics.Rate().IsInCycle;
 }