Пример #1
0
        /// <inheritdoc/>
        public void Execute(TextWriter writer, IList<IMetric> metrics)
        {
            Ensure.ArgumentNotNull(writer, "writer");
            Ensure.ArgumentNotNull(metrics, "metrics");

            var visitor = new FormattedOutputMetricVisitor(writer);
            metrics.Accept(visitor);
        }
Пример #2
0
        /// <inheritdoc/>
        public void Execute(TextWriter writer, IList<IMetric> metrics)
        {
            using (var xmlWriter = XmlWriter.Create(writer))
            {
                xmlWriter.WriteStartElement("benchmark");

                var visitor = new XmlOutputMetricVisitor(xmlWriter);
                metrics.Accept(visitor);

                xmlWriter.WriteEndElement();
            }
        }