private static void solveNestedTypes(TypeDefinition Type) { List <TypeReference> allNested = new List <TypeReference>(); var TNameCXX = Type.CXXTypeName(); foreach (var Nested in Type.NestedTypes) { solveNestedTypes(Nested); allNested.Concat(nestedTypes[Nested.CXXTypeName()]); allNested.Add(Nested); } nestedTypes.TryAdd(TNameCXX, allNested); }