示例#1
0
        /// <summary>
        /// Adds a table row with two cells to the report.
        /// </summary>
        /// <param name="key">The text of the first column.</param>
        /// <param name="files">The files.</param>
        public void KeyValueRow(string key, IEnumerable <string> files)
        {
            if (files == null)
            {
                throw new ArgumentNullException(nameof(files));
            }

            this.reportTextWriter.WriteStartElement(XmlRenderer.ReplaceNonLetterChars(key));

            foreach (var file in files)
            {
                this.reportTextWriter.WriteStartElement("File");
                this.reportTextWriter.WriteValue(file);
                this.reportTextWriter.WriteEndElement();
            }

            this.reportTextWriter.WriteEndElement();
        }
示例#2
0
        /// <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(nameof(metric));
            }

            this.reportTextWriter.WriteStartElement(XmlRenderer.ReplaceNonLetterChars(metric.ShortName));

            foreach (var m in metric.Metrics)
            {
                this.reportTextWriter.WriteStartElement(XmlRenderer.ReplaceNonLetterChars(m.Name));
                this.reportTextWriter.WriteValue(m.Value.ToString(CultureInfo.InvariantCulture));
                this.reportTextWriter.WriteEndElement();
            }

            this.reportTextWriter.WriteEndElement();
        }
示例#3
0
 /// <summary>
 /// Adds a header to the report.
 /// </summary>
 /// <param name="text">The text.</param>
 public void Header(string text)
 {
     this.reportTextWriter.WriteStartElement(XmlRenderer.ReplaceNonLetterChars(text));
 }
示例#4
0
 /// <summary>
 /// Adds a table row with two cells to the report.
 /// </summary>
 /// <param name="key">The text of the first column.</param>
 /// <param name="value">The text of the second column.</param>
 public void KeyValueRow(string key, string value)
 {
     this.reportTextWriter.WriteStartElement(XmlRenderer.ReplaceNonLetterChars(key));
     this.reportTextWriter.WriteValue(value);
     this.reportTextWriter.WriteEndElement();
 }