forked from lucaslorentz/minicover
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request lucaslorentz#25 from lucaslorentz/fix-duplicated-s…
…ource-file-handling Fix errors when multiple assemblies points to same source file
- Loading branch information
Showing
3 changed files
with
21 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
namespace MiniCover.Model | ||
{ | ||
public class SourceFile | ||
{ | ||
public static SourceFile Merge(IEnumerable<SourceFile> sources) | ||
{ | ||
return new SourceFile | ||
{ | ||
Instructions = sources.SelectMany(s => s.Instructions).ToList() | ||
}; | ||
} | ||
|
||
public List<InstrumentedInstruction> Instructions = new List<InstrumentedInstruction>(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters