diff --git a/src/DotNet/CustomAttribute.cs b/src/DotNet/CustomAttribute.cs
index 030d27fb2..377fdf82e 100644
--- a/src/DotNet/CustomAttribute.cs
+++ b/src/DotNet/CustomAttribute.cs
@@ -43,8 +43,26 @@ public string TypeFullName {
return string.Empty;
}
- }
-
+ }
+
+ ///
+ /// Gets the name of the attribute type
+ ///
+ internal string TypeName {
+ get {
+ if (ctor is MemberRef mrCtor)
+ return mrCtor.GetDeclaringTypeName() ?? string.Empty;
+
+ if (ctor is MethodDef mdCtor) {
+ var declType = mdCtor.DeclaringType;
+ if (declType is not null)
+ return declType.Name;
+ }
+
+ return string.Empty;
+ }
+ }
+
///
/// true if the raw custom attribute blob hasn't been parsed
///
diff --git a/src/DotNet/CustomAttributeCollection.cs b/src/DotNet/CustomAttributeCollection.cs
index c3b8a53af..07fba4659 100644
--- a/src/DotNet/CustomAttributeCollection.cs
+++ b/src/DotNet/CustomAttributeCollection.cs
@@ -37,8 +37,12 @@ public CustomAttributeCollection(int length, object context, Func