Skip to content
This repository was archived by the owner on Jul 3, 2020. It is now read-only.

Commit afa6ecb

Browse files
committed
include DetailedXml format for dotcover
1 parent 2bbf9af commit afa6ecb

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

Parsers/DotCoverParser.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,16 @@ public override CoverageReport Process()
2121
var namespaces = modules.Elements("Assembly").SelectMany(x => x.Elements("Namespace"));
2222
//modules.Elements("SolutionFolder").Elements("Project").SelectMany(x => x.Elements("Namespace"));
2323
var moduleIndex = 0;
24-
25-
var fileList = GetProjectFilesList(modules.Elements("File"));
24+
Dictionary<string, string> fileList;
25+
if(modules.Element("FileIndices") != null)
26+
{
27+
fileList = GetProjectFilesList(modules.Element("FileIndices").Elements("File"));
28+
}
29+
else
30+
{
31+
fileList = GetProjectFilesList(modules.Elements("File"));
32+
}
33+
2634

2735
foreach (var module in namespaces)
2836
{
@@ -43,6 +51,10 @@ public override CoverageReport Process()
4351
string fileId = String.Empty;
4452
var methodCoverage = new List<LineCoverage>();
4553
var methods = projectClass.Elements("Member");
54+
if(methods.Count() == 0)
55+
{
56+
methods = projectClass.Elements("Method");
57+
}
4658
foreach (var method in methods)
4759
{
4860

0 commit comments

Comments
 (0)