mirror of
				https://github.com/MindWorkAI/AI-Studio.git
				synced 2025-11-04 11:40:21 +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;
 | 
					        typeName ??= type.Name;
 | 
				
			||||||
        typeNamespace ??= type.Namespace!;
 | 
					        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 ns = $"{typeNamespace}::{typeName}".ToUpperInvariant().Replace(".", "::");
 | 
				
			||||||
        var key = $"root::{ns}::T{fallbackEN.ToFNV32()}";
 | 
					        var key = $"root::{ns}::T{fallbackEN.ToFNV32()}";
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user