-
-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#690 Fixed handling of history files for classes with not unique names
- Loading branch information
1 parent
2a2ed5d
commit 78a1a92
Showing
5 changed files
with
34 additions
and
14 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 |
---|---|---|
|
@@ -37,8 +37,20 @@ public class Class | |
/// <param name="name">The name of the class.</param> | ||
/// <param name="assembly">The assembly.</param> | ||
internal Class(string name, Assembly assembly) | ||
: this(name, name, assembly) | ||
{ | ||
} | ||
|
||
Check warning on line 43 in src/ReportGenerator.Core/Parser/Analysis/Class.cs GitHub Actions / build
|
||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Class"/> class. | ||
/// </summary> | ||
/// <param name="name">The name of the class.</param> | ||
/// <param name="assembly">The assembly.</param> | ||
internal Class(string name, string rawName, Assembly assembly) | ||
{ | ||
this.Name = name ?? throw new ArgumentNullException(nameof(name)); | ||
this.RawName = rawName ?? throw new ArgumentNullException(nameof(rawName)); | ||
this.Assembly = assembly ?? throw new ArgumentNullException(nameof(assembly)); | ||
|
||
this.DisplayName = name; | ||
|
@@ -95,6 +107,11 @@ internal Class(string name, Assembly assembly) | |
/// </summary> | ||
public string DisplayName { get; } | ||
|
||
/// <summary> | ||
/// Gets the raw name of the class. | ||
/// </summary> | ||
public string RawName { get; } | ||
|
||
/// <summary> | ||
/// Gets the assembly. | ||
/// </summary> | ||
|
@@ -214,7 +231,7 @@ public override bool Equals(object obj) | |
else | ||
{ | ||
var @class = (Class)obj; | ||
return @class.Name.Equals(this.Name) && @class.Assembly.Equals(this.Assembly); | ||
return @class.RawName.Equals(this.RawName) && @class.Assembly.Equals(this.Assembly); | ||
} | ||
} | ||
|
||
|
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
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