mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 02:38:00 +00:00
Remove generic suffix from type names in ILangExtensions
This commit is contained in:
1 file changed
+4
@@ -12,6 +12,10 @@ public static class ILangExtensions
|
||||
typeName ??= type.Name;
|
||||
typeNamespace ??= type.Namespace!;
|
||||
|
||||
// When the type's name ends with `1 or 2`, etc. (i.e., generic classes), remove it:
|
||||
if(typeName.Contains("`"))
|
||||
typeName = typeName[..typeName.IndexOf('`')];
|
||||
|
||||
var ns = $"{typeNamespace}::{typeName}".ToUpperInvariant().Replace(".", "::");
|
||||
var key = $"root::{ns}::T{fallbackEN.ToFNV32()}";
|
||||
|
||||
|
||||
Reference in new issue
Block a user