Ejemplo n.º 1
0
        internal void SetSolutionFolder([CanBeNull] SolutionFolder solutionFolder, PrimitiveProject primitiveProject)
        {
            ControlFlow.Assert(solutionFolder == null || solutionFolder.Solution == primitiveProject.Solution,
                               "Project and solution folder must belong to the same solution.");

            PrimitiveProjectParents[primitiveProject] = solutionFolder;
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 internal SolutionFolder GetSolutionFolder(PrimitiveProject primitiveProject)
 {
     return(PrimitiveProjectParents.TryGetValue(primitiveProject, out var parent) ? parent : null);
 }