コード例 #1
0
        public static string MakeSecondReport(IEnumerable <Measurement> data)
        {
            var reportMaker = new MarkdownReportMaker();

            var content = new ReportContent("Median");

            foreach (var propertyInfo in typeof(Measurement).GetProperties())
            {
                var name = propertyInfo.Name;
                content.AddItem(new ReportItem(name,
                                               Statistics.MedianStat(
                                                   data.Select(z => (double)typeof(Measurement).GetProperty(name).GetValue(z))
                                                   ).ToString(CultureInfo.InvariantCulture)));
            }

            return(reportMaker.MakeReport(content));
        }
コード例 #2
0
        public static string MakeFirstReport(IEnumerable <Measurement> data)
        {
            var reportMaker = new HtmlReportMaker();

            var content = new ReportContent("Mean and Std");

            foreach (var propertyInfo in typeof(Measurement).GetProperties())
            {
                var name = propertyInfo.Name;
                content.AddItem(new ReportItem(name,
                                               Statistics.DeviationsStat(
                                                   data.Select(z => (double)typeof(Measurement).GetProperty(name).GetValue(z))
                                                   ).ToString()));
            }

            return(reportMaker.MakeReport(content));
        }