Ejemplo n.º 1
0
        public string MakeReport(IEnumerable <Measurement> measurements)
        {
            var result = new StringBuilder();

            result.Append(Caption);
            result.Append(MakeItem("Temperature",
                                   StatMaker.MakeStat(measurements.Select(z => z.Temperature)).ToString()));
            result.Append(MakeItem("Humidity",
                                   StatMaker.MakeStat(measurements.Select(z => z.Humidity)).ToString()));
            return(result.ToString());
        }
Ejemplo n.º 2
0
 public MarkdownGenerator(StatMaker statMaker)
 {
     StatMaker = statMaker;
     Caption   = $"## {StatMaker.Caption}\n\n";
 }
Ejemplo n.º 3
0
 public HtmlGenerator(StatMaker statMaker)
 {
     StatMaker = statMaker;
     Caption   = $"<h1>{StatMaker.Caption}</h1>";
 }