/// <summary> /// Adds the given metric values to the report. /// </summary> /// <param name="metric">The metric.</param> public void MetricsRow(MethodMetric metric) { if (metric == null) { throw new ArgumentNullException("metric"); } this.reportBuilder.Append("<tr>"); this.reportBuilder.AppendFormat("<td>{0}</td>", WebUtility.HtmlEncode(metric.Name)); foreach (var metricValue in metric.Metrics.Select(m => m.Value)) { this.reportBuilder.AppendFormat("<td>{0}</td>", metricValue); } this.reportBuilder.Append("</tr>"); }
/// <summary> /// Adds the given metric values to the report. /// </summary> /// <param name="metric">The metric.</param> public void MetricsRow(MethodMetric metric) { if (metric == null) { throw new ArgumentNullException("metric"); } string metrics = string.Join(" & ", metric.Metrics.Select(m => m.Value)); string row = string.Format( CultureInfo.InvariantCulture, @"\textbf{{{0}}} & {1}\\", EscapeLatexChars(ShortenString(metric.Name, 20)), metrics); this.reportBuilder.AppendLine(row); this.reportBuilder.AppendLine(@"\hline"); }
/// <summary> /// Adds the given metric values to the report. /// </summary> /// <param name="metric">The metric.</param> public void MetricsRow(MethodMetric metric) { if (metric == null) { throw new ArgumentNullException("metric"); } this.currentElement.Add(new XElement( ReplaceInvalidXmlChars(metric.Name), metric.Metrics.Select(m => new XElement(ReplaceInvalidXmlChars(m.Name), m.Value)))); }