95 references to Id
Microsoft.CodeAnalysis.CodeStyle.LegacyTestFramework.UnitTestUtilities (1)
AbstractCodeActionOrUserDiagnosticTest.cs (1)
241var documentId = DocumentId.CreateNewId(project.Id);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (60)
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (5)
145var dependentProject = workspace.Projects.Single(proj => proj.Id != project.Id); 147references.Add(new ProjectReference(project.Id)); 149workspace.OnProjectReferenceAdded(dependentProject.Id, new ProjectReference(project.Id));
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
1063var projectId = workspace.Projects[0].Id;
Squiggles\ErrorSquiggleProducerTests.cs (3)
289workspace.OnProjectRemoved(workspace.Projects.First().Id); 321new object(), workspace, workspace.CurrentSolution, document.Project.Id, document.Id, 365new LiveId(), workspace, workspace.CurrentSolution, document.Project.Id, document.Id,
Workspaces\WorkspaceTests_EditorFeatures.cs (51)
70workspace.OnParseOptionsChanged(project.Id, project.ParseOptions); 107workspace.OnProjectRemoved(project.Id); 123workspace.OnProjectRemoved(project.Id); 137Assert.Throws<ArgumentException>(() => workspace.OnProjectRemoved(project.Id)); 151Assert.Throws<ArgumentException>(() => workspace.OnProjectRemoved(project2.Id)); 224.GetProjectState(project1.Id) 231.GetProjectState(project2.Id) 264Assert.Throws<ArgumentException>(() => workspace.OnProjectReferenceAdded(project1.Id, new ProjectReference(project2.Id))); 279var reference = new ProjectReference(project2.Id); 280workspace.OnProjectReferenceAdded(project1.Id, reference); 301workspace.OnProjectReferenceAdded(project1.Id, new ProjectReference(project2.Id)); 303Assert.Throws<ArgumentException>(() => workspace.OnProjectReferenceAdded(project1.Id, new ProjectReference(project2.Id))); 318workspace.OnProjectReferenceAdded(project1.Id, new ProjectReference(project2.Id)); 319workspace.OnProjectReferenceRemoved(project1.Id, new ProjectReference(project2.Id)); 340workspace.OnProjectReferenceAdded(project1.Id, new ProjectReference(project2.Id)); 342Assert.Throws<ArgumentException>(() => workspace.OnProjectReferenceAdded(project2.Id, new ProjectReference(project1.Id))); 357workspace.OnProjectRemoved(project1.Id); 374workspace.OnProjectRemoved(project1.Id); 393workspace.OnProjectRemoved(project1.Id); 553var newVersion = await cs.GetProject(project1.Id).GetDependentSemanticVersionAsync(); 652workspace.OnProjectRemoved(project1.Id); 702var newSolution = oldSolution.AddDocument(DocumentId.CreateNewId(project1.Id), "Doc2", SourceText.From(doc2Text)); 707Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 728Assert.Equal(0, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1176Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1177Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1186Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1187Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1188Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Single().Name); 1212Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1213Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1222Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1223Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1224Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name); 1243Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1244Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1250Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1251Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1252Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Single().Name); 1271Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1272Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1278Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1279Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1280Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name);
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (1)
CodeActions\AbstractCodeActionOrUserDiagnosticTest.cs (1)
241var documentId = DocumentId.CreateNewId(project.Id);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (14)
Diagnostics\GenerateType\GenerateTypeTestState.cs (2)
39TriggeredProject = Workspace.CurrentSolution.GetProject(_testDocument.Project.Id); 44ProjectToBeModified = Workspace.CurrentSolution.GetProject(_testDocument.Project.Id);
LanguageServer\AbstractLanguageServerProtocolTests.cs (1)
336solution = solution.WithProjectFilePath(project.Id, GetDocumentFilePathFromName(project.FilePath));
Squiggles\TestDiagnosticTagProducer.cs (1)
70projectId: document.Project.Id,
Workspaces\TestHostDocument.cs (3)
65var project = workspace.CurrentSolution.GetRequiredProject(_project!.Id); 191_id = DocumentId.CreateNewId(project.Id, this.Name); 195Contract.ThrowIfFalse(project.Id == this.Id.ProjectId);
Workspaces\TestHostProject.cs (2)
246ProjectReferences = projectReferences != null ? projectReferences.Select(p => new ProjectReference(p.Id)) : SpecializedCollections.EmptyEnumerable<ProjectReference>(); 348Id,
Workspaces\TestWorkspace.cs (1)
271=> this.Projects.FirstOrDefault(p => p.Id == projectId);
Workspaces\TestWorkspace_XmlConsumption.cs (4)
176OnProjectReferenceAdded(fromProject.Id, new ProjectReference(toProject.Id, aliases.Any() ? aliases : default)); 191OnProjectReferenceAdded(submissions[i].Id, new ProjectReference(submissions[j].Id));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (1)
66workspace.Projects.Single().Id,
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (3)
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
47Dim newSln = workspace.CurrentSolution.AddAdditionalDocument(DocumentId.CreateNewId(project.Id), "App.Config", SourceText.From("false"))
Diagnostics\DiagnosticProviderTests.vb (1)
336Select doc.Project.Id).Single()
NavigationBar\NavigationBarControllerTests.vb (1)
297workspace.OnProjectNameChanged(workspace.Projects.Single().Id, "VBProj2", "VBProj2.vbproj")
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
DocumentOutline\DocumentOutlineTestsBase.cs (1)
133solution = solution.WithProjectFilePath(project.Id, "C:\\" + project.Name);
Microsoft.VisualStudio.LanguageServices.UnitTests (14)
SolutionExplorer\AnalyzerItemsSourceTests.vb (1)
26Dim analyzerFolder = New AnalyzersFolderItem(workspace, project.Id, Nothing, Nothing)
SolutionExplorer\AnalyzerItemTests.vb (2)
26Dim analyzerFolder = New AnalyzersFolderItem(workspace, project.Id, Nothing, Nothing) 45Dim analyzerFolder = New AnalyzersFolderItem(workspace, project.Id, Nothing, Nothing)
SolutionExplorer\AnalyzersFolderItemTests.vb (2)
26Dim analyzerFolder = New AnalyzersFolderItem(workspace, project.Id, Nothing, Nothing) 44Dim analyzerFolder = New AnalyzersFolderItem(workspace, project.Id, Nothing, Nothing)
SolutionExplorer\CpsDiagnosticItemSourceTests.vb (2)
36workspace.OnAnalyzerReferenceAdded(project.Id, New TestAnalyzerReferenceByLanguage(analyzers, analyzerPath)) 41project.Id,
SolutionExplorer\SourceGeneratorItemTests.vb (7)
29Dim projectId = workspace.Projects.Single().Id 49Dim projectId = workspace.Projects.Single().Id 74Dim projectId = workspace.Projects.Single().Id 108Dim projectId = workspace.Projects.Single().Id 135Dim projectId = workspace.Projects.Single().Id 163Dim projectId = workspace.Projects.Single().Id 205Dim projectId = workspace.Projects.Single().Id