1 write to Collection
Microsoft.Build.Engine.OM.UnitTests (1)
ObjectModelRemoting\RemoteProjectsProviderMock\ExporterMock.cs (1)
159this.Collection = new ProjectCollection();
61 references to Collection
Microsoft.Build.Engine.OM.UnitTests (61)
ObjectModelRemoting\Helpers\TestCollectionGroup.cs (6)
207result.Add(this.Local, new HashSet<Project>(this.Local.Collection.LoadedProjects)); 211result.Add(r, new HashSet<Project>(r.Collection.LoadedProjects)); 249linker.Collection.UnloadAllProjects(); 254foreach (var p in linker.Collection.LoadedProjects) 264linker.Collection.UnloadProject(p); 265linker.Collection.UnloadProject(p.Xml);
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (1)
467=> VerifyProjectCollectionLinks(linker.Collection, path, expectedLocal, expectedLinks);
ObjectModelRemoting\LinkedEvaluationModify_Tests.cs (4)
40var viewProj = pcLocal.Collection.GetLoadedProjects(proj1Path).FirstOrDefault(); 114var viewProj = pcLocal.Collection.GetLoadedProjects(proj1Path).FirstOrDefault(); 310var viewProj = pcLocal.Collection.GetLoadedProjects(proj1Path).FirstOrDefault(); 346var viewProj = pcLocal.Collection.GetLoadedProjects(proj1Path).FirstOrDefault();
ObjectModelRemoting\LinkedProjectCollection_Tests.cs (44)
41var loadedLocal = pcLocal.Collection.LoadedProjects; 42var loadedRemote = pcRemote.Collection.LoadedProjects; 51loadedLocal = pcLocal.Collection.LoadedProjects; 55var localProj = pcLocal.Collection.GetLoadedProjects(proj1Path).FirstOrDefault(); 58var remoteProj = pcLocal.Collection.GetLoadedProjects(proj2Path).FirstOrDefault(); 84var loadedLocal = pcLocal.Collection.LoadedProjects; 85var loadedRemote0 = pcRemote0.Collection.LoadedProjects; 86var loadedRemote1 = pcRemote1.Collection.LoadedProjects; 94var loadedWithExternal = pcLocal.Collection.LoadedProjects; 97var prj0Coll = pcLocal.Collection.GetLoadedProjects(proj0Path); 101var prj1Coll = pcLocal.Collection.GetLoadedProjects(proj1Path); 106var prj2Coll = pcLocal.Collection.GetLoadedProjects(proj2Path); 115var prj3Coll = pcLocal.Collection.GetLoadedProjects(proj3Path); 132Assert.Equal(0, pcLocal.Collection.LoadedProjects.Count); 133Assert.Equal(0, pcRemote.Collection.LoadedProjects.Count); 136Assert.Equal(1, pcLocal.Collection.LoadedProjects.Count); 137Assert.Equal(1, pcLocal.Collection.GetLoadedProjects(proj0Path).Count); 140Assert.Equal(2, pcLocal.Collection.LoadedProjects.Count); 141Assert.Equal(1, pcLocal.Collection.GetLoadedProjects(proj1Path).Count); 144Assert.Equal(3, pcLocal.Collection.LoadedProjects.Count); 145Assert.Equal(1, pcLocal.Collection.GetLoadedProjects(proj2Path).Count); 147pcRemote.Collection.UnloadProject(proj1); 148Assert.Equal(2, pcLocal.Collection.LoadedProjects.Count); 149Assert.Equal(0, pcLocal.Collection.GetLoadedProjects(proj1Path).Count); 150Assert.Equal(1, pcLocal.Collection.GetLoadedProjects(proj2Path).Count); 159Assert.Equal(0, this.StdGroup.Local.Collection.LoadedProjects.Count); 160Assert.Equal(0, this.StdGroup.Remote[0].Collection.LoadedProjects.Count); 161Assert.Equal(0, this.StdGroup.Remote[1].Collection.LoadedProjects.Count); 164ViewValidation.VerifyProjectCollectionLinks(this.StdGroup.Local.Collection.LoadedProjects, 1, 0); 165ViewValidation.VerifyProjectCollectionLinks(this.StdGroup.Remote[0].Collection.LoadedProjects, 0, 1); 166ViewValidation.VerifyProjectCollectionLinks(this.StdGroup.Remote[1].Collection.LoadedProjects, 0, 1); 172ViewValidation.VerifyProjectCollectionLinks(this.StdGroup.Local.Collection.LoadedProjects, 2, 0); 173ViewValidation.VerifyProjectCollectionLinks(this.StdGroup.Remote[0].Collection.LoadedProjects, 0, 2); 174ViewValidation.VerifyProjectCollectionLinks(this.StdGroup.Remote[1].Collection.LoadedProjects, 0, 2); 180ViewValidation.VerifyProjectCollectionLinks(this.StdGroup.Local.Collection.LoadedProjects, 2, 1); 181ViewValidation.VerifyProjectCollectionLinks(this.StdGroup.Remote[0].Collection.LoadedProjects, 1, 2); 182ViewValidation.VerifyProjectCollectionLinks(this.StdGroup.Remote[1].Collection.LoadedProjects, 0, 3); 189ViewValidation.VerifyProjectCollectionLinks(this.StdGroup.Local.Collection.LoadedProjects, 2, 2); 190ViewValidation.VerifyProjectCollectionLinks(this.StdGroup.Remote[0].Collection.LoadedProjects, 1, 3); 191ViewValidation.VerifyProjectCollectionLinks(this.StdGroup.Remote[1].Collection.LoadedProjects, 1, 3); 196this.StdGroup.Local.Collection.UnloadAllProjects(); 198ViewValidation.VerifyProjectCollectionLinks(this.StdGroup.Local.Collection.LoadedProjects, 0, 2); 199ViewValidation.VerifyProjectCollectionLinks(this.StdGroup.Remote[0].Collection.LoadedProjects, 1, 1); 200ViewValidation.VerifyProjectCollectionLinks(this.StdGroup.Remote[1].Collection.LoadedProjects, 1, 1);
ObjectModelRemoting\RemoteProjectsProviderMock\ExporterMock.cs (6)
160this.LinkFactory = LinkedObjectsFactory.Get(this.Collection); 163public Project LoadProject(string path) => this.Collection.LoadProject(path); 167public Project LoadProjectWithSettings(string path, ProjectLoadSettings settings) => new Project(path, null, null, this.Collection, settings); 175Project project = new Project(xml, null, null, this.Collection, settings); 194ExternalProjectsProvider.SetExternalProjectsProvider(this.Collection, value ? this : null); 362var toRemote = LinkedObjectsFactory.GetLocalProjects(this.Collection, filePath);