Exemplo n.º 1
0
 internal void GenerateClass()
 {
     ControllerHost host = new ControllerHost();
     host.ClassName = className;
     host.Actions = actions;
     host.NameSpace = parseproj.RootNameSpace;
     string output = host.ProcessTemplate();
     string filePath = Path.Combine(currentPath, "Controllers", className + ".cs");
     File.WriteAllText(filePath, output, Encoding.UTF8);
     parseproj.AddCompileFile("Controllers\\" + className + ".cs");
     parseproj.Save();
 }
Exemplo n.º 2
0
 internal void GenerateAssetClass()
 {
     ControllerHost host = new ControllerHost();
     host.Template = "assets.tt";
     host.NameSpace = parseproj.RootNameSpace;
     string filePath = Path.Combine(currentPath, "Controllers", "AssetsController.cs");
     if (!File.Exists(filePath))
     {
         string output = host.ProcessTemplate();
         File.WriteAllText(filePath, output, Encoding.UTF8);
         parseproj.AddCompileFile("Controllers\\AssetsController.cs");
         parseproj.Save();
     }
 }