Skip to content

Commit 082410f

Browse files
committed
Trim generic type info in subclassed elements' ClassName
1 parent e997fcc commit 082410f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Element.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,14 @@ public Element()
7373
// For subclasses get the actual classname
7474
if (GetType() != typeof(Element))
7575
{
76-
ClassName = GetType().Name;
76+
var type = GetType().Name;
77+
var index = type.IndexOf('`');
78+
if (index > 0)
79+
{
80+
type = type[..index];
81+
}
82+
83+
ClassName = type;
7784
}
7885
}
7986

0 commit comments

Comments
 (0)