Tests.GenerateTestComponents.Generate C# (CSharp) Method

Generate() public static method

public static Generate ( ) : void
return void
        public static void Generate()
        {
            var generatedFolder = getEntitasProjectDir() + "/Tests/Tests/Entitas/CodeGenerator/Fixtures/Generated/";

            var codeGenerators = new ICodeGenerator[] {
                new ComponentExtensionsGenerator(),
                new ComponentIndicesGenerator(),
                new ContextAttributesGenerator(),
                new ContextsGenerator(),
                new BlueprintsGenerator()
            };

            var types = new [] {
                typeof(AnimatingComponent),
                typeof(CComponent),
                typeof(ComponentWithFieldsAndProperties),
                typeof(CustomPrefixComponent),
                typeof(DefaultContextComponent),
                typeof(MovableComponent),
                typeof(MultipleContextAndDefaultContextComponent),
                typeof(NamespaceComponent),
                typeof(OtherContextComponent),
                typeof(PersonComponent),
                typeof(SomeClass),
                typeof(SomeClassHideInBlueprintInspector),
                typeof(SomeStruct),
                typeof(UserComponent)
            };

            var contexts = new [] {
                "ContextA",
                "ContextB",
                "ContextC",
                "OtherContext",
                "SomeContext",
                "SomeOtherContext"
            };

            var blueprints = new [] {
                "Gem",
                "Blocker"
            };

            var provider = new TypeReflectionProvider(types, contexts, blueprints);
            var files = CodeGenerator.Generate(provider, generatedFolder, codeGenerators);

            foreach(var file in files) {
                Console.WriteLine("Generated: " + file.fileName);
            }

            Console.WriteLine("Done. Press any key...");
            Console.Read();
        }
GenerateTestComponents