Beispiel #1
0
        private void AddProject(SolutionProxy solution, EnvDTE.Project vsProject)
        {
            var project = new ProjectProxy(vsProject.Name, solution);

            project.VsProject     = vsProject;
            project.DirectoryPath = new System.IO.FileInfo(vsProject.FullName).Directory.FullName;
            project.RootNamespace = ParseRootNamespace(vsProject);
            solution.Projects.Add(project);

            for (int x = 1; x <= vsProject.ProjectItems.Count; x++)
            {
                var item = vsProject.ProjectItems.Item(x);
                if (item.Kind == EnvDTE.Constants.vsProjectItemKindPhysicalFolder)
                {
                    AddSubFolderInProject(project, item);
                }
                else if (item.Kind == EnvDTE.Constants.vsProjectItemKindPhysicalFile)
                {
                    AddFileToFolder(project, item);
                }
            }
        }
        private void AddProject(SolutionProxy solution, EnvDTE.Project vsProject)
        {
            var project = new ProjectProxy(vsProject.Name, solution);
            project.VsProject = vsProject;
            project.DirectoryPath = new System.IO.FileInfo(vsProject.FullName).Directory.FullName;
            project.RootNamespace = ParseRootNamespace(vsProject);
            solution.Projects.Add(project);

            for (int x = 1; x <= vsProject.ProjectItems.Count; x++)
            {
                var item = vsProject.ProjectItems.Item(x);
                if (item.Kind == EnvDTE.Constants.vsProjectItemKindPhysicalFolder)
                {
                    AddSubFolderInProject(project, item);
                }
                else if (item.Kind == EnvDTE.Constants.vsProjectItemKindPhysicalFile)
                {
                    AddFileToFolder(project, item);
                }
            }
        }