public CodeGeneratorData[] GetData()
        {
            if (_types == null)
            {
                _types = PluginUtil
                         .GetAssembliesResolver(_assembliesConfig.assemblies, _codeGeneratorConfig.searchPaths)
                         .GetTypes();
            }

            var entityIndexData = _types
                                  .Where(type => !type.IsAbstract)
                                  .Where(type => type.ImplementsInterface <IComponent>())
                                  .ToDictionary(
                type => type,
                type => type.GetPublicMemberInfos())
                                  .Where(kv => kv.Value.Any(info => info.attributes.Any(attr => attr.attribute is AbstractEntityIndexAttribute)))
                                  .Select(kv => createEntityIndexData(kv.Key, kv.Value));

            var customEntityIndexData = _types
                                        .Where(type => !type.IsAbstract)
                                        .Where(type => Attribute.IsDefined(type, typeof(CustomEntityIndexAttribute)))
                                        .Select(type => createCustomEntityIndexData(type));

            return(entityIndexData
                   .Concat(customEntityIndexData)
                   .ToArray());
        }
        public CodeGeneratorData[] GetData()
        {
            if (_types == null)
            {
                _types = PluginUtil
                         .GetAssembliesResolver(_assembliesConfig.assemblies, _codeGeneratorConfig.searchPaths)
                         .GetTypes();
            }

            var dataFromComponents = _types
                                     .Where(type => type.ImplementsInterface <IComponent>())
                                     .Where(type => !type.IsAbstract)
                                     .Select(type => createDataForComponent(type));

            var dataFromNonComponents = _types
                                        .Where(type => !type.ImplementsInterface <IComponent>())
                                        .Where(type => !type.IsGenericType)
                                        .Where(type => hasContexts(type))
                                        .SelectMany(type => createDataForNonComponent(type));

            var generatedComponentsLookup = dataFromNonComponents.ToLookup(data => data.GetFullTypeName());

            return(dataFromComponents
                   .Where(data => !generatedComponentsLookup.Contains(data.GetFullTypeName()))
                   .Concat(dataFromNonComponents)
                   .ToArray());
        }