/// <summary>
 /// Write the report to a file path.
 /// </summary>
 /// <param name="report">The report.</param>
 /// <param name="path">Destination file path.</param>
 public static void WriteToFile(IReport report, string path)
 {
     using (var reportWriter = new HtmlReportRenderer(new StreamWriter(path)))
     {
         reportWriter.Render(report);
     }
 }
Example #2
0
        static void WriteHtmlReport(string inputPath, string outputPath)
        {
            if (outputPath == null)
            {
                throw new ArgumentNullException(nameof(outputPath));
            }
            if (inputPath == null)
            {
                throw new ArgumentNullException(nameof(inputPath));
            }

            var report = JsonReportReader.ReadFromFile(inputPath);

            HtmlReportRenderer.WriteToFile(report, outputPath);
        }