private void btnGenareCode_Click(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(txtPathSln.Text)) { MessageBox.Show("Digite o caminho da Solution SLN."); } else { try { Cursor.Current = Cursors.WaitCursor; _ProjectsToGenarate = new List <Project>(); foreach (var project in _ProjectsToTreeView) { TreeNode projectNode = treeViewProjects.Nodes.Find(project.NameSpace, true).FirstOrDefault(); if (projectNode != null && projectNode.Checked) { GenerateCode generateCode = new GenerateCode(); generateCode.PathSolution = txtPathSln.Text + "\\"; generateCode.Entity = project.ProjectClasses[0].Name; GenerateCodeService codeService = new GenerateCodeService(project, generateCode); codeService.executeDDD(); } } Cursor.Current = Cursors.Default; } catch (Exception ex) { MessageBox.Show("Erro ao criar Solution."); } } }
public static ServiceResults Invoke_GenerateCodeService(GenerateCodeService service) { return new GenerateCodeServiceResults() { GeneratedCode = GenerateCodeFromElement(service.Element) }; }