コード例 #1
0
			internal bool AddContents(Solution solution, ProjectCreateInformation projectCreateInformation, string defaultLanguage, ISolutionFolderContainer parentFolder)
			{
				// Create sub projects
				foreach (SolutionFolderDescriptor folderDescriptor in solutionFoldersDescriptors) {
					SolutionFolder folder = solution.CreateFolder(folderDescriptor.name);
					parentFolder.AddFolder(folder);
					folderDescriptor.AddContents(solution, projectCreateInformation, defaultLanguage, folder);
				}
				foreach (ProjectDescriptor projectDescriptor in projectDescriptors) {
					IProject newProject = projectDescriptor.CreateProject(projectCreateInformation, defaultLanguage);
					if (newProject == null)
						return false;
					newProject.Location = FileUtility.GetRelativePath(projectCreateInformation.SolutionPath, newProject.FileName);
					parentFolder.AddFolder(newProject);
				}
				return true;
			}
コード例 #2
0
        public void RemoveSolutionFolder(ISolutionFolder solutionFolder)
        {
            IProject project = solutionFolder as IProject;

            if (project != null)
            {
                RemoveProject(project);
            }

            ISolutionFolderContainer solutionFolderContainer = solutionFolder as ISolutionFolderContainer;

            if (solutionFolderContainer != null)
            {
                foreach (ISolutionFolder subSolutionFolder in solutionFolderContainer.Folders)
                {
                    RemoveSolutionFolder(subSolutionFolder);
                }
            }
        }