We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 017b3d9 commit a1f18b4Copy full SHA for a1f18b4
src/coverlet.core/Instrumentation/Instrumenter.cs
@@ -66,12 +66,9 @@ private void InstrumentModule()
66
using (var module = ModuleDefinition.ReadModule(stream, parameters))
67
{
68
var types = module.GetTypes();
69
- foreach (var type in types)
+ foreach (TypeDefinition type in types)
70
71
- TypeDefinition actualType = type;
72
- if (type.FullName.Contains("/"))
73
- actualType = types.FirstOrDefault(t => t.FullName == type.FullName.Split('/')[0]);
74
-
+ var actualType = type.DeclaringType ?? type;
75
if (!actualType.CustomAttributes.Any(IsExcludeAttribute)
76
&& !InstrumentationHelper.IsTypeExcluded(_module, actualType.FullName, _filters))
77
InstrumentType(type);
0 commit comments