public void Generate() { string path; path = $"GeneratorResult\\{Helpers.GenerateTimeStamp()}"; if (!Directory.Exists("GeneratorResult")) { Directory.CreateDirectory("GeneratorResult"); } Directory.CreateDirectory(path); Directory.CreateDirectory($"{path}\\Php"); Directory.CreateDirectory($"{path}\\Typescript"); //add missing fields AddMissingFields(); SetParentChildsFields(); _sqlGenerator.Generate(path); _phpGenerator.Generate(path); _typescriptGenerator.Generate(path); foreach (string file in Directory.EnumerateFiles($"{path}\\Php")) { File.Copy(file, $"d:\\xampp\\htdocs\\generator\\Test\\{Path.GetFileName(file)}", true); } foreach (string file in Directory.EnumerateFiles($"{path}\\Php\\Models")) { File.Copy(file, $"d:\\xampp\\htdocs\\generator\\Test\\Models\\{Path.GetFileName(file)}", true); } }
public void Generate() { string path; _timestamp = Helpers.GenerateTimeStamp(); path = $"GeneratorResult\\{_timestamp}"; if (!IO.DoesDirectoryExists("GeneratorResult")) { IO.CreateDirectory("GeneratorResult"); } if (IO.DoesDirectoryExists(path)) { IO.DeleteDirectory(path); } IO.CreateDirectory(path); IO.CreateDirectory($"{path}\\Php"); IO.CreateDirectory($"{path}\\Typescript"); IO.CreateDirectory($"{path}\\Java"); //add missing fields AddMissingFields(); SetParentChildsFields(); _sqlGenerator.Generate(path); _phpGenerator.Generate(path); _typescriptGenerator.Generate(path); _cSharpGenerator.Generate(path); _documentationGenerator.Generate(path); _javaGenerator.Generate(path); _pythonGenerator.Generate(path); _generatorConfigGenerator.Generate(path); /* * foreach (string file in Directory.EnumerateFiles($"{path}\\Php")) * { * File.Copy(file, $"d:\\xampp\\htdocs\\generator\\Test\\{Path.GetFileName(file)}", true); * } * * foreach (string file in Directory.EnumerateFiles($"{path}\\Php\\Models")) * { * File.Copy(file, $"d:\\xampp\\htdocs\\generator\\Test\\Models\\{Path.GetFileName(file)}", true); * }*/ }