367 references to CreateNewId
IdeCoreBenchmarks (4)
Microsoft.AspNetCore.Analyzer.Testing (2)
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
Microsoft.CodeAnalysis.EditorFeatures (2)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (13)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Microsoft.CodeAnalysis.Features (3)
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
Microsoft.CodeAnalysis.Features.UnitTests (6)
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces (4)
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
Microsoft.CodeAnalysis.Workspaces.UnitTests (272)
SolutionTests\ProjectInfoTests.cs (31)
24var pid = ProjectId.CreateNewId();
37var pid = ProjectId.CreateNewId();
52var projectReference = new ProjectReference(ProjectId.CreateNewId());
75var documentInfo = DocumentInfo.Create(DocumentId.CreateNewId(ProjectId.CreateNewId()), "doc");
77var info1 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", documents: [documentInfo]);
80var info2 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#");
83var info3 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", documents: []);
86var info4 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", documents: []);
94var documentInfo = DocumentInfo.Create(DocumentId.CreateNewId(ProjectId.CreateNewId()), "doc");
96var info1 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", additionalDocuments: [documentInfo]);
99var info2 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#");
102var info3 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", additionalDocuments: []);
105var info4 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", additionalDocuments: []);
113var projectReference = new ProjectReference(ProjectId.CreateNewId());
115var info1 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", projectReferences: [projectReference]);
118var info2 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#");
121var info3 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", projectReferences: []);
124var info4 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", projectReferences: []);
134var info1 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", metadataReferences: [metadataReference]);
137var info2 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#");
140var info3 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", metadataReferences: []);
143var info4 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", metadataReferences: []);
153var info1 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", analyzerReferences: [analyzerReference]);
156var info2 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#");
159var info3 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", analyzerReferences: []);
162var info4 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", analyzerReferences: []);
169var projectInfo = ProjectInfo.Create(name: "Goo", filePath: @"C:\", id: ProjectId.CreateNewId(), version: VersionStamp.Default, assemblyName: "Bar", language: "C#");
176var projectInfo = ProjectInfo.Create(name: "Goo", id: ProjectId.CreateNewId(), version: VersionStamp.Default, assemblyName: "Bar", language: "C#");
183var projectId = ProjectId.CreateNewId();
185var instance = ProjectInfo.Create(name: "Name", id: ProjectId.CreateNewId(), version: VersionStamp.Default, assemblyName: "AssemblyName", language: "C#");
187SolutionTestHelpers.TestProperty(instance, (old, value) => old.WithId(value), opt => opt.Id, ProjectId.CreateNewId(), defaultThrows: true);
SolutionTests\SolutionTests.cs (179)
50private static readonly DocumentId s_unrelatedDocumentId = DocumentId.CreateNewId(ProjectId.CreateNewId());
54var projectId = ProjectId.CreateNewId();
72var projectId1 = ProjectId.CreateNewId();
73var projectId2 = ProjectId.CreateNewId();
328var projectId = ProjectId.CreateNewId();
833var projectId1 = ProjectId.CreateNewId();
834var projectId2 = ProjectId.CreateNewId();
1075var projectId = ProjectId.CreateNewId();
1076var projectId2 = ProjectId.CreateNewId();
1295var projectId = ProjectId.CreateNewId();
1330var projectId = ProjectId.CreateNewId();
1365var projectId = ProjectId.CreateNewId();
1400var projectId = ProjectId.CreateNewId();
1435var projectId = ProjectId.CreateNewId();
1451Assert.Throws<InvalidOperationException>(() => solution.WithProjectAssemblyName(ProjectId.CreateNewId(), "x.dll"));
1457var projectId = ProjectId.CreateNewId();
1475Assert.Throws<InvalidOperationException>(() => solution.WithProjectOutputFilePath(ProjectId.CreateNewId(), "x.dll"));
1481var projectId = ProjectId.CreateNewId();
1512var projectId = ProjectId.CreateNewId();
1529Assert.Throws<InvalidOperationException>(() => solution.WithProjectOutputRefFilePath(ProjectId.CreateNewId(), "x.dll"));
1535var projectId = ProjectId.CreateNewId();
1552Assert.Throws<InvalidOperationException>(() => solution.WithProjectCompilationOutputInfo(ProjectId.CreateNewId(), info));
1558var projectId = ProjectId.CreateNewId();
1575Assert.Throws<InvalidOperationException>(() => solution.WithProjectDefaultNamespace(ProjectId.CreateNewId(), "x"));
1581var projectId = ProjectId.CreateNewId();
1598var projectId = ProjectId.CreateNewId();
1672var projectId = ProjectId.CreateNewId();
1689Assert.Throws<InvalidOperationException>(() => solution.WithProjectName(ProjectId.CreateNewId(), "x"));
1695var projectId = ProjectId.CreateNewId();
1712Assert.Throws<InvalidOperationException>(() => solution.WithProjectFilePath(ProjectId.CreateNewId(), "x"));
1718var projectId = ProjectId.CreateNewId();
1728Assert.Throws<InvalidOperationException>(() => solution.WithProjectCompilationOptions(ProjectId.CreateNewId(), options));
1734var projectId = ProjectId.CreateNewId();
1760var projectId = ProjectId.CreateNewId();
1777Assert.Throws<InvalidOperationException>(() => solution.WithProjectParseOptions(ProjectId.CreateNewId(), options));
1783var projectId = ProjectId.CreateNewId();
1817var projectId = ProjectId.CreateNewId();
1855var projectId = ProjectId.CreateNewId();
1874var projectId = ProjectId.CreateNewId();
1893var projectId = ProjectId.CreateNewId();
1916var projectId2 = ProjectId.CreateNewId();
1935Assert.Throws<InvalidOperationException>(() => solution.WithProjectReferences(ProjectId.CreateNewId(), [projectRef]));
1948var externalProjectRef = new ProjectReference(ProjectId.CreateNewId());
1964var projectId2 = ProjectId.CreateNewId();
1965var projectId3 = ProjectId.CreateNewId();
1973var externalProjectRef = new ProjectReference(ProjectId.CreateNewId());
2007var projectId2 = ProjectId.CreateNewId();
2010var externalProjectRef = new ProjectReference(ProjectId.CreateNewId());
2029Assert.Throws<ArgumentException>("projectReference", () => solution.RemoveProjectReference(projectId, new ProjectReference(ProjectId.CreateNewId())));
2032Assert.Throws<InvalidOperationException>(() => solution.RemoveProjectReference(ProjectId.CreateNewId(), projectRef2));
2041var projectId0 = ProjectId.CreateNewId();
2042var submissionId1 = ProjectId.CreateNewId();
2043var submissionId2 = ProjectId.CreateNewId();
2044var submissionId3 = ProjectId.CreateNewId();
2086Assert.Throws<InvalidOperationException>(() => solution.WithProjectMetadataReferences(ProjectId.CreateNewId(), [metadataRef]));
2138Assert.Throws<InvalidOperationException>(() => solution.RemoveMetadataReference(ProjectId.CreateNewId(), metadataRef1));
2156Assert.Throws<InvalidOperationException>(() => solution.WithProjectAnalyzerReferences(ProjectId.CreateNewId(), [analyzerRef]));
2211Assert.Throws<InvalidOperationException>(() => solution.RemoveAnalyzerReference(ProjectId.CreateNewId(), analyzerRef1));
2359var projectId = ProjectId.CreateNewId();
2378Assert.Throws<InvalidOperationException>(() => solution.AddDocument(documentId: DocumentId.CreateNewId(ProjectId.CreateNewId()), "name", loader));
2384var projectId = ProjectId.CreateNewId();
2409Assert.Throws<InvalidOperationException>(() => solution.AddDocument(documentId: DocumentId.CreateNewId(ProjectId.CreateNewId()), "name", "text"));
2415var projectId = ProjectId.CreateNewId();
2437Assert.Throws<InvalidOperationException>(() => solution.AddDocument(documentId: DocumentId.CreateNewId(ProjectId.CreateNewId()), "name", sourceText));
2443var projectId = ProjectId.CreateNewId();
2466Assert.Throws<InvalidOperationException>(() => solution.AddDocument(documentId: DocumentId.CreateNewId(ProjectId.CreateNewId()), "name", syntaxRoot: root));
2472var projectId = ProjectId.CreateNewId();
2503var projectId = ProjectId.CreateNewId();
2530var pid = ProjectId.CreateNewId();
2543var project1 = ProjectId.CreateNewId();
2555var project1 = ProjectId.CreateNewId();
2556var project2 = ProjectId.CreateNewId();
2565var pid = ProjectId.CreateNewId();
2609var projectId = ProjectId.CreateNewId();
2632var projectId1 = ProjectId.CreateNewId();
2633var projectId2 = ProjectId.CreateNewId();
2659var projectId1 = ProjectId.CreateNewId();
2660var projectId2 = ProjectId.CreateNewId();
2685var projectId = ProjectId.CreateNewId();
2705var projectId1 = ProjectId.CreateNewId();
2706var projectId2 = ProjectId.CreateNewId();
2727var projectId1 = ProjectId.CreateNewId();
2728var projectId2 = ProjectId.CreateNewId();
2746var projectId1 = ProjectId.CreateNewId();
2747var projectId2 = ProjectId.CreateNewId();
2765var projectId1 = ProjectId.CreateNewId();
2766var projectId2 = ProjectId.CreateNewId();
2800var pm1 = ProjectId.CreateNewId();
2801var pm2 = ProjectId.CreateNewId();
2818var pm1 = ProjectId.CreateNewId();
2819var pm2 = ProjectId.CreateNewId();
2924var projectIds = Enumerable.Range(0, 5).Select(i => ProjectId.CreateNewId()).ToArray();
2944var project1 = ProjectId.CreateNewId();
2982var project1 = ProjectId.CreateNewId();
3040var project1 = ProjectId.CreateNewId();
3059var pid = ProjectId.CreateNewId();
3078var pid = ProjectId.CreateNewId();
3079var pid2 = ProjectId.CreateNewId();
3104var pid = ProjectId.CreateNewId();
3105var pid2 = ProjectId.CreateNewId();
3134var pid = ProjectId.CreateNewId();
3156var projectId = ProjectId.CreateNewId();
3178var pid = ProjectId.CreateNewId();
3216var pid = ProjectId.CreateNewId();
3257var projectId = ProjectId.CreateNewId();
3297var pid = ProjectId.CreateNewId();
3321var pid = ProjectId.CreateNewId();
3341var pid = ProjectId.CreateNewId();
3364var pid = ProjectId.CreateNewId();
3388var pid = ProjectId.CreateNewId();
3408var pid = ProjectId.CreateNewId();
3429var pid = ProjectId.CreateNewId();
3451var pid = ProjectId.CreateNewId();
3471var pid = ProjectId.CreateNewId();
3491var pid = ProjectId.CreateNewId();
3510var pid = ProjectId.CreateNewId();
3541var pid = ProjectId.CreateNewId();
3572var pid = ProjectId.CreateNewId();
3598var pid = ProjectId.CreateNewId();
3625var pid = ProjectId.CreateNewId();
3649var pid = ProjectId.CreateNewId();
3714var pid = ProjectId.CreateNewId();
3739var pid = ProjectId.CreateNewId();
3768var pid = ProjectId.CreateNewId();
3907var pid = ProjectId.CreateNewId();
3932var pid1 = ProjectId.CreateNewId("p1");
3933var pid2 = ProjectId.CreateNewId("p2");
3934var pid3 = ProjectId.CreateNewId("p3");
4018ProjectId.CreateNewId(),
4026ProjectId.CreateNewId(),
4046ProjectId.CreateNewId(),
4056ProjectId.CreateNewId(),
4219ProjectId.CreateNewId(),
4228ProjectId.CreateNewId(),
4564var pid = ProjectId.CreateNewId();
4635var pid = ProjectId.CreateNewId();
4673var projectId = ProjectId.CreateNewId();
4709var projectId = ProjectId.CreateNewId();
4750var projectId = ProjectId.CreateNewId();
4795var projectId = ProjectId.CreateNewId();
4826var projectId = ProjectId.CreateNewId();
4877var projectId = ProjectId.CreateNewId();
4897var projectId = ProjectId.CreateNewId();
4918var projectId = ProjectId.CreateNewId();
4936var projectId = ProjectId.CreateNewId();
4960var projectId1 = ProjectId.CreateNewId();
4961var projectId2 = ProjectId.CreateNewId();
4982var projectId1 = ProjectId.CreateNewId();
4983var projectId2 = ProjectId.CreateNewId();
5010var projectId1 = ProjectId.CreateNewId();
5011var projectId2 = ProjectId.CreateNewId();
5038var projectId1 = ProjectId.CreateNewId();
5039var projectId2 = ProjectId.CreateNewId();
5040var projectId3 = ProjectId.CreateNewId();
5067var projectId1 = ProjectId.CreateNewId();
5068var projectId2 = ProjectId.CreateNewId();
5069var projectId3 = ProjectId.CreateNewId();
5098var projectId1 = ProjectId.CreateNewId();
5099var projectId2 = ProjectId.CreateNewId();
5100var projectId3 = ProjectId.CreateNewId();
5136var projectId1 = ProjectId.CreateNewId();
5153var projectId1 = ProjectId.CreateNewId();
5154var projectId2 = ProjectId.CreateNewId();
5155var projectId3 = ProjectId.CreateNewId();
5199var projectId1 = ProjectId.CreateNewId();
5200var projectId2 = ProjectId.CreateNewId();
5201var projectId3 = ProjectId.CreateNewId();
5243var projectId1 = ProjectId.CreateNewId();
5244var projectId2 = ProjectId.CreateNewId();
5267var csProjectId = ProjectId.CreateNewId();
5268var vbProjectId = ProjectId.CreateNewId();
5324ProjectId.CreateNewId(),
5333ProjectId.CreateNewId(),
5342ProjectId.CreateNewId(),
5352ProjectId.CreateNewId(),
5362ProjectId.CreateNewId(),
5372ProjectId.CreateNewId(),
5420var pid = ProjectId.CreateNewId();
5503var projectId = ProjectId.CreateNewId();
Microsoft.VisualStudio.LanguageServices (1)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (3)
Microsoft.VisualStudio.LanguageServices.LiveShare (3)
Roslyn.VisualStudio.Next.UnitTests (28)
Services\SolutionServiceTests.cs (3)
88ProjectId.CreateNewId(), VersionStamp.Create(), "test", "test.dll", LanguageNames.CSharp,
117ProjectId.CreateNewId(), VersionStamp.Create(), "test", "test.dll", LanguageNames.CSharp,
924project1 = project1.AddProjectReference(new ProjectReference(ProjectId.CreateNewId()));