Esempio n. 1
0
        private void ExportCsCode(string path)
        {
            var file  = Entity["File_Model_Action"];
            var coder = new ExportActionCoder
            {
                Entity  = Entity,
                Project = Project
            };

            path = IOHelper.CheckPaths(path, Path.GetDirectoryName(file));
            WriteFile(Path.Combine(path, "Export.cs"), coder.Code());
        }
Esempio n. 2
0
        private void ActionCsCode(string path)
        {
            var file  = ConfigPath(Entity, "File_Web_Action_cs", path, $"Page\\{Entity.Parent.Name}\\{Entity.Name}", "PageAction");
            var coder = new VueCoder
            {
                Entity  = Entity,
                Project = Project
            };

            IOHelper.CheckPaths(Path.GetDirectoryName(file));
            WriteFile(file + ".cs", coder.Code());
            WriteFile(file + ".Designer.cs", coder.BaseCode());
        }
Esempio n. 3
0
        private void ActionCsCode(string path)
        {
            var file  = Entity.TryGetExtendConfig("File_Model_Action", $"Page\\{Entity.Name}\\{Entity.Name}PageAction");
            var coder = new ApiActionCoder
            {
                Entity  = Entity,
                Project = Project
            };

            IOHelper.CheckPaths(path, Path.GetDirectoryName(file));
            WriteFile(SetPath(path, file, ".cs"), coder.Code());
            WriteFile(SetPath(path, file, ".Designer.cs"), coder.BaseCode());
        }
Esempio n. 4
0
 protected string SetPath(string path, string name, string ext = "")
 {
     name += ext;
     IOHelper.CheckPaths(path, Path.GetDirectoryName(name));
     return(Path.Combine(path, name));
 }