internal void AddPrimitiveProject(PrimitiveProject primitiveProject, SolutionFolder solutionFolder = null) { var otherProject = PrimitiveProjects.FirstOrDefault(x => x.ProjectId.Equals(primitiveProject.ProjectId)); ControlFlow.Assert(otherProject == null, $"Cannot add '{primitiveProject.Name}' because its id '{primitiveProject.ProjectId}' is already taken by '{otherProject?.Name}'."); PrimitiveProjects.Add(primitiveProject); PrimitiveProjectParents.Add(primitiveProject, solutionFolder); }
public IReadOnlyCollection <PrimitiveProject> RemoveSolutionFolder(SolutionFolder solutionFolder) { var children = GetNestedPrimitiveProjects(solutionFolder); foreach (var child in children) { SetSolutionFolder(solutionFolder.SolutionFolder, child); } PrimitiveProjects.Remove(solutionFolder); return(children); }
public void RemoveProject(Project project) { PrimitiveProjects.Remove(project); PrimitiveProjectParents.Remove(project); }