mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-05-03 09:39:47 +00:00
Remove generic suffix from type names in ILangExtensions
This commit is contained in:
parent
09d87d2443
commit
b1c0cb3a42
@ -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()}";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user