We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3d0af0 commit 99b439aCopy full SHA for 99b439a
source/MetadataProcessor.Core/Extensions/TypeDefinitionExtensions.cs
@@ -72,8 +72,21 @@ public static EnumDeclaration ToEnumDeclaration(this TypeDefinition source)
72
}
73
else
74
{
75
- // something very wrong here...
76
- throw new ArgumentException($"Can't process enum type {source.FullName}.");
+ try
+ {
77
+ // namespace not showing up, remove everything before the last '.'
78
+ enumName = source.FullName.Substring(
79
+ source.DeclaringType.FullName.LastIndexOf('.'))
80
+ .Replace(".", "");
81
+
82
+ // replace '/' separator
83
+ enumName = source.FullName.Replace("/", "_");
84
+ }
85
+ catch
86
87
+ // something very wrong here...
88
+ throw new ArgumentException($"Can't process enum type {source.FullName}.");
89
90
91
92
0 commit comments