|
1 | 1 | using System;
|
2 | 2 | using System.Collections.Generic;
|
| 3 | +#if DEBUG |
3 | 4 | using System.Diagnostics;
|
| 5 | +#endif |
4 | 6 | using System.IO;
|
5 | 7 | using System.IO.Compression;
|
6 | 8 | using System.Linq;
|
7 | 9 | using System.Text;
|
8 | 10 | using System.Threading.Tasks;
|
| 11 | +using System.Xml.Serialization; |
9 | 12 | using ArchiMetrics.Analysis;
|
10 | 13 | using ArchiMetrics.Common;
|
11 | 14 | using ArchiMetrics.Common.Metrics;
|
12 | 15 | using MetricsExtractor.Custom;
|
13 | 16 | using MetricsExtractor.ReportTemplate;
|
14 |
| -using Microsoft.CodeAnalysis.Options; |
15 | 17 |
|
16 | 18 | namespace MetricsExtractor
|
17 | 19 | {
|
@@ -58,6 +60,7 @@ private static string GenerateReport(EstadoDoProjeto resultadoGeral, string solu
|
58 | 60 | {
|
59 | 61 | var reportDirectory = Path.Combine(solutionDirectory, "CodeMetricsReport");
|
60 | 62 | var reportPath = Path.Combine(reportDirectory, "CodeMetricsReport.zip");
|
| 63 | + var rawReportPath = Path.Combine(reportDirectory, "RawCodeMetricsReport.xml"); |
61 | 64 |
|
62 | 65 | var reportTemplateFactory = new ReportTemplateFactory();
|
63 | 66 | var report = reportTemplateFactory.GetReport(resultadoGeral);
|
@@ -85,6 +88,13 @@ private static string GenerateReport(EstadoDoProjeto resultadoGeral, string solu
|
85 | 88 | #endif
|
86 | 89 | zipArchive.Dispose();
|
87 | 90 | }
|
| 91 | + |
| 92 | + using (var fileStream = File.Open(rawReportPath, FileMode.Create)) |
| 93 | + { |
| 94 | + var xmlSerializer = new XmlSerializer(typeof(EstadoDoProjeto)); |
| 95 | + xmlSerializer.Serialize(fileStream, resultadoGeral); |
| 96 | + } |
| 97 | + |
88 | 98 | return reportPath;
|
89 | 99 | }
|
90 | 100 |
|
|
0 commit comments