Пример #1
0
        public MigrationFile[] Migrate(string path)
        {
            var properties = MigrationUtils.GetFiles(path, "*.properties");

            for (int i = 0; i < properties.Length; i++)
            {
                var file = properties[i];

                file.fileContent = file.fileContent.Replace("CodeGenerator.SearchPaths", "Jenny.SearchPaths");

                file.fileContent = file.fileContent.Replace("CodeGenerator.Plugins", "Jenny.Plugins");

                file.fileContent = file.fileContent.Replace("CodeGenerator.PreProcessors", "Jenny.PreProcessors");
                file.fileContent = file.fileContent.Replace("CodeGenerator.DataProviders", "Jenny.DataProviders");
                file.fileContent = file.fileContent.Replace("CodeGenerator.CodeGenerators", "Jenny.CodeGenerators");
                file.fileContent = file.fileContent.Replace("CodeGenerator.PostProcessors", "Jenny.PostProcessors");

                file.fileContent = file.fileContent.Replace("CodeGenerator.CLI.Ignore.UnusedKeys", "Jenny.Ignore.Keys");
                file.fileContent = file.fileContent.Replace("Ignore.Keys", "Jenny.Ignore.Keys");

                file.fileContent = file.fileContent.Replace("CodeGenerator.Server.Port", "Jenny.Server.Port");
                file.fileContent = file.fileContent.Replace("CodeGenerator.Client.Host", "Jenny.Client.Host");
            }

            return(properties);
        }
Пример #2
0
        public MigrationFile[] Migrate(string path)
        {
            var files = MigrationUtils.GetFiles(path, "QFramework.properties");

            for (int i = 0; i < files.Length; i++)
            {
                var file = files[i];

                file.fileContent = file.fileContent.Replace("ComponentsGenerator", "ComponentExtensionsGenerator");
                file.fileContent = file.fileContent.Replace("PoolAttributeGenerator", "PoolAttributesGenerator");
            }

            return(files);
        }
Пример #3
0
        public MigrationFile[] Migrate(string path)
        {
            var properties = MigrationUtils.GetFiles(path, "Entitas.properties");

            for (int i = 0; i < properties.Length; i++)
            {
                var file = properties[i];

                // Entitas.CodeGenerator.Pools = Input,Core,Score

                file.fileContent = file.fileContent.Replace("Entitas.CodeGenerator.Pools", "Entitas.CodeGenerator.Contexts");
            }

            return(properties);
        }
    void when_migrating()
    {
        var dir = Environment.CurrentDirectory + "/Tests/Tests/Entitas.Migration/Fixtures/M0180";

        it["gets only *.cs source files"] = () => {
            var files = MigrationUtils.GetFiles(dir);
            files.Length.should_be(6);
            files.Any(file => file.fileName == Path.Combine(dir, "SourceFile.cs")).should_be_true();
            files.Any(file => file.fileName == Path.Combine(dir, Path.Combine("SubFolder", "SourceFile2.cs"))).should_be_true();
            files.Any(file => file.fileName == Path.Combine(dir, "RenderPositionSystem.cs")).should_be_true();
            files.Any(file => file.fileName == Path.Combine(dir, "RenderRotationSystem.cs")).should_be_true();
            files.Any(file => file.fileName == Path.Combine(dir, Path.Combine("SubFolder", "RenderSelectedSystem.cs"))).should_be_true();
            files.Any(file => file.fileName == Path.Combine(dir, Path.Combine("SubFolder", "MoveSystem.cs"))).should_be_true();
        };
    }