Skip to content

Commit

Permalink
Keep sourcefiles sorted after merging them
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaslorentz committed Feb 13, 2018
1 parent 8a2923b commit 945898f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/MiniCover/Model/InstrumentationResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ public void AddExtraAssembly(string file)
ExtraAssemblies.Add(file);
}

public Dictionary<string, SourceFile> GetSourceFiles()
public SortedDictionary<string, SourceFile> GetSourceFiles()
{
return Assemblies
return new SortedDictionary<string, SourceFile>(Assemblies
.SelectMany(a => a.SourceFiles)
.GroupBy(kv => kv.Key, kv => kv.Value)
.ToDictionary(g => g.Key, g => SourceFile.Merge(g));
.ToDictionary(g => g.Key, g => SourceFile.Merge(g)));
}
}
}

0 comments on commit 945898f

Please sign in to comment.