// Important: This method should be called after Generate(poolNames) // This will overwrite the empty lookups with the actual content. public CodeGenFile[] Generate(ComponentInfo[] componentInfos) { var orderedComponentInfos = componentInfos.OrderBy(info => info.typeName).ToArray(); var lookupTagToComponentInfosMap = getLookupTagToComponentInfosMap(orderedComponentInfos); return lookupTagToComponentInfosMap .Select(kv => new CodeGenFile { fileName = kv.Key, fileContent = generateIndicesLookup(kv.Key, kv.Value.ToArray()).ToUnixLineEndings() }).ToArray(); }
// Important: This method should be called after Generate(contextNames) // This will overwrite the empty lookups with the actual content. public CodeGenFile[] Generate(ComponentInfo[] componentInfos) { var orderedComponentInfos = componentInfos.OrderBy(info => info.typeName).ToArray(); var lookupTagToComponentInfosMap = getLookupTagToComponentInfosMap(orderedComponentInfos); var generatorName = GetType().FullName; return lookupTagToComponentInfosMap .Select(kv => new CodeGenFile( kv.Key, generateIndicesLookup(kv.Key, kv.Value.ToArray()), generatorName )).ToArray(); }