Esempio n. 1
0
 public void SetupSolutionFrame()
 {
     string path = string.Format(@"{0}\{1}", m_Arch.SolutionFolder, m_Arch.SolutionName);
       Directory.CreateDirectory(path);
       m_Solution = new VSNetSolution(m_Arch.SolutionFolder, m_Arch.SolutionName);
       string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
       foreach (string str3 in m_RefAsm.Values)
       {
     File.Copy(Path.Combine(directoryName, str3), Path.Combine(path, str3), true);
     m_Solution.AddSolutionFile(str3);
       }
       VSNetCSharpProject project = m_Solution.AddClassLibProject(m_Arch.UtilityLayer.NameSpace);
       GenerationHelper.AsmInfo(project.ProjectFolder, GenerationHelper.UtilityName);
       project.AddFile("AssemblyInfo.cs");
       foreach (string str4 in m_RefAsm.Values)
       {
     project.AddAsmReference(str4, string.Format(@"..\{0}", str4));
       }
       VSNetCSharpProject project2 = m_Solution.AddClassLibProject(m_Arch.BusinessDocsLayer.NameSpace);
       GenerationHelper.AsmInfo(project2.ProjectFolder, GenerationHelper.BusinessDocsName);
       project2.AddFile("AssemblyInfo.cs");
       project2.AddProjectReference(project);
       foreach (string str5 in m_RefAsm.Values)
       {
     project2.AddAsmReference(str5, string.Format(@"..\{0}", str5));
       }
       foreach (DataAccessModel model in m_Arch.DataLayers)
       {
     VSNetCSharpProject project3 = m_Solution.AddClassLibProject(model.NameSpace);
     foreach (string str6 in m_RefAsm.Values)
     {
       project3.AddAsmReference(str6, string.Format(@"..\{0}", str6));
     }
     GenerationHelper.AsmInfo(project3.ProjectFolder, model.LayerName);
     project3.AddFile("AssemblyInfo.cs");
     project3.AddProjectReference(project);
     GenerationHelper.EmptyFile(project3.ProjectFolder, GenerationHelper.CreateTablePath);
     project3.AddSimpleFile(GenerationHelper.CreateTablePath);
     GenerationHelper.EmptyFile(project3.ProjectFolder, GenerationHelper.StoredProcPath);
     project3.AddSimpleFile(GenerationHelper.StoredProcPath);
     GenerationHelper.EmptyFile(project3.ProjectFolder, GenerationHelper.OldDropTablePath);
     project3.AddSimpleFile(GenerationHelper.OldDropTablePath);
     if (File.Exists(Path.Combine(project3.ProjectFolder, GenerationHelper.DropTablePath)))
     {
       File.Copy(Path.Combine(project3.ProjectFolder, GenerationHelper.DropTablePath),                    Path.Combine(project3.ProjectFolder, GenerationHelper.OldDropTablePath), true);
     }
     GenerationHelper.EmptyFile(project3.ProjectFolder, GenerationHelper.DropTablePath);
     project3.AddSimpleFile(GenerationHelper.DropTablePath);
     if (!File.Exists(Path.Combine(project3.ProjectFolder, GenerationHelper.CustomStoredProcPath)))
     {
       GenerationHelper.EmptyFile(project3.ProjectFolder, GenerationHelper.CustomStoredProcPath);
     }
     project3.AddSimpleFile(GenerationHelper.CustomStoredProcPath);
       }
       foreach (ServiceLayerModel model2 in m_Arch.ServiceLayers)
       {
     VSNetCSharpProject project4 = m_Solution.AddClassLibProject(model2.NameSpace);
     foreach (string str7 in m_RefAsm.Values)
     {
       project4.AddAsmReference(str7, string.Format(@"..\{0}", str7));
     }
     GenerationHelper.AsmInfo(project4.ProjectFolder, model2.LayerName);
     project4.AddFile("AssemblyInfo.cs");
     project4.AddProjectReference(project);
     project4.AddProjectReference(project2);
     project4.AddProjectReference(m_Solution.GetProject(model2.DataAccessLayer.NameSpace));
       }
 }
Esempio n. 2
0
 // Methods
 public SolutionItems(string name, string attr, VSNetSolution parent)
     : base(name, attr, parent)
 {
     Items = new Hashtable();
 }
Esempio n. 3
0
 // Methods
 public VSNetCSharpProject(ProjectType type, string name, VSNetSolution parent)
 {
     ProjectType = type;
       ProjectName = name;
       Parent = parent;
       ProjectID = Guid.NewGuid().ToString("B");
 }
Esempio n. 4
0
 // Methods
 public GlobalSection(string name, string attr, VSNetSolution parent)
 {
     Name = name;
       Attr = attr;
       Parent = parent;
 }