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); }
public Reporter RegisterStat(Func <ClrRuntime, Stat> statCollector) { StatCollectors.Add(statCollector); return(this); }