@@ -19,7 +19,8 @@ internal class ArchBuilder
19
19
{
20
20
private readonly ArchitectureCache _architectureCache ;
21
21
private readonly ArchitectureCacheKey _architectureCacheKey ;
22
- private readonly List < IType > _architectureTypes = new List < IType > ( ) ;
22
+ private readonly IDictionary < string , IType > _architectureTypes =
23
+ new Dictionary < string , IType > ( ) ;
23
24
private readonly AssemblyRegistry _assemblyRegistry ;
24
25
private readonly LoadTaskRegistry _loadTaskRegistry ;
25
26
private readonly NamespaceRegistry _namespaceRegistry ;
@@ -43,7 +44,7 @@ public ArchBuilder()
43
44
_architectureCache = ArchitectureCache . Instance ;
44
45
}
45
46
46
- public IEnumerable < IType > Types => _architectureTypes ;
47
+ public IEnumerable < IType > Types => _architectureTypes . Values ;
47
48
public IEnumerable < Assembly > Assemblies => _assemblyRegistry . Assemblies ;
48
49
public IEnumerable < Namespace > Namespaces => _namespaceRegistry . Namespaces ;
49
50
@@ -83,6 +84,7 @@ public void LoadTypesForModule(ModuleDefinition module, string namespaceFilter)
83
84
t . FullName != "Microsoft.CodeAnalysis.EmbeddedAttribute"
84
85
&& t . FullName != "System.Runtime.CompilerServices.NullableAttribute"
85
86
&& t . FullName != "System.Runtime.CompilerServices.NullableContextAttribute"
87
+ && ! t . FullName . StartsWith ( "Coverlet" )
86
88
)
87
89
. ToList ( ) ;
88
90
@@ -109,10 +111,10 @@ public void LoadTypesForModule(ModuleDefinition module, string namespaceFilter)
109
111
. ForEach ( typeDefinition =>
110
112
{
111
113
var type = _typeFactory . GetOrCreateTypeFromTypeReference ( typeDefinition ) ;
112
- if ( ! _architectureTypes . Contains ( type ) && ! type . IsCompilerGenerated )
114
+ if ( ! _architectureTypes . ContainsKey ( type . FullName ) && ! type . IsCompilerGenerated )
113
115
{
114
116
currentTypes . Add ( type ) ;
115
- _architectureTypes . Add ( type ) ;
117
+ _architectureTypes . Add ( type . FullName , type ) ;
116
118
}
117
119
} ) ;
118
120
0 commit comments