Beispiel #1
0
        public Report Report(ClrRuntime runtime)
        {
            var report = new Report();

            report.Stats = StatCollectors
                           .Select(s => s(runtime))
                           .Concat(MultiStatCollectors
                                   .SelectMany(c => c(runtime)))
                           .ToList();

            report.Metrics = MetricCollectors
                             .Select(m => m(runtime))
                             .Concat(MultiMetricCollectors
                                     .SelectMany(c => c(runtime)))
                             .ToList();

            report.Issues = Detectors.SelectMany(d => d(runtime, report)).ToList();

            return(report);
        }
Beispiel #2
0
 public Reporter RegisterStat(Func <ClrRuntime, Stat> statCollector)
 {
     StatCollectors.Add(statCollector);
     return(this);
 }