252 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 (11)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Microsoft.CodeAnalysis.EditorFeatures (2)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (6)
Microsoft.CodeAnalysis.Features (9)
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
Microsoft.CodeAnalysis.Features.UnitTests (12)
Microsoft.CodeAnalysis.Workspaces (10)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
Microsoft.CodeAnalysis.Workspaces.UnitTests (161)
SolutionTests\SolutionTests.cs (120)
50private static readonly DocumentId s_unrelatedDocumentId = DocumentId.CreateNewId(ProjectId.CreateNewId());
60.AddDocument(DocumentId.CreateNewId(projectId), "goo.cs", SourceText.From("public class Goo { }", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "goo.cs"))
61.AddAdditionalDocument(DocumentId.CreateNewId(projectId), "add.txt", SourceText.From("text", Encoding.UTF8, SourceHashAlgorithms.Default))
62.AddAnalyzerConfigDocument(DocumentId.CreateNewId(projectId), "editorcfg", SourceText.From(editorConfig ?? "#empty", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "editorcfg"))));
82.AddDocument(DocumentId.CreateNewId(projectId1), "goo.cs", SourceText.From(docContents, Encoding.UTF8, SourceHashAlgorithms.Default), filePath: "goo.cs")
83.AddAdditionalDocument(DocumentId.CreateNewId(projectId1), "add.txt", SourceText.From("text", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: "add.txt")
84.AddAnalyzerConfigDocument(DocumentId.CreateNewId(projectId1), "editorcfg", SourceText.From("config", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: "/a/b")
86.AddDocument(DocumentId.CreateNewId(projectId2), "goo.cs", SourceText.From(docContents, Encoding.UTF8, SourceHashAlgorithms.Default), filePath: "goo.cs")
87.AddAdditionalDocument(DocumentId.CreateNewId(projectId2), "add.txt", SourceText.From("text", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: "add.txt")
88.AddAnalyzerConfigDocument(DocumentId.CreateNewId(projectId2), "editorcfg", SourceText.From("config", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: "/a/b")));
333.AddDocument(DocumentId.CreateNewId(projectId), "goo.cs", "public class Goo { }")
334.AddAnalyzerConfigDocument(DocumentId.CreateNewId(projectId), "editorcfg", SourceText.From("config"));
843.AddDocument(DocumentId.CreateNewId(projectId1), "goo.cs", SourceText.From(docContents, Encoding.UTF8, SourceHashAlgorithms.Default), filePath: "goo.cs")
845.AddDocument(DocumentId.CreateNewId(projectId2), "goo.cs", SourceText.From(docContents, Encoding.UTF8, SourceHashAlgorithms.Default), filePath: "goo.cs")));
1080var d1 = DocumentId.CreateNewId(projectId);
1081var d2 = DocumentId.CreateNewId(projectId);
1082var d3 = DocumentId.CreateNewId(projectId);
1083var a1 = DocumentId.CreateNewId(projectId);
1084var a2 = DocumentId.CreateNewId(projectId);
1085var a3 = DocumentId.CreateNewId(projectId);
1086var c1 = DocumentId.CreateNewId(projectId);
1087var c2 = DocumentId.CreateNewId(projectId);
1088var c3 = DocumentId.CreateNewId(projectId);
1599var documentAId = DocumentId.CreateNewId(projectId);
1600var documentBId = DocumentId.CreateNewId(projectId);
1601var documentCId = DocumentId.CreateNewId(projectId);
1602var fileDocumentId = DocumentId.CreateNewId(projectId);
1784var documentId = DocumentId.CreateNewId(projectId);
1818var documentId = DocumentId.CreateNewId(projectId);
1856var documentId = DocumentId.CreateNewId(projectId);
1875var documentId = DocumentId.CreateNewId(projectId);
1894var documentId = DocumentId.CreateNewId(projectId);
2310var editorConfigId = DocumentId.CreateNewId(solution3.Projects.Single().Id);
2366var documentId = DocumentId.CreateNewId(projectId);
2378Assert.Throws<InvalidOperationException>(() => solution.AddDocument(documentId: DocumentId.CreateNewId(ProjectId.CreateNewId()), "name", loader));
2391var documentId = DocumentId.CreateNewId(projectId);
2409Assert.Throws<InvalidOperationException>(() => solution.AddDocument(documentId: DocumentId.CreateNewId(ProjectId.CreateNewId()), "name", "text"));
2421var documentId = DocumentId.CreateNewId(projectId);
2437Assert.Throws<InvalidOperationException>(() => solution.AddDocument(documentId: DocumentId.CreateNewId(ProjectId.CreateNewId()), "name", sourceText));
2450var documentId = DocumentId.CreateNewId(projectId);
2466Assert.Throws<InvalidOperationException>(() => solution.AddDocument(documentId: DocumentId.CreateNewId(ProjectId.CreateNewId()), "name", syntaxRoot: root));
2479var documentId = DocumentId.CreateNewId(projectId);
2510var documentId = DocumentId.CreateNewId(projectId);
2566var did = DocumentId.CreateNewId(pid);
2591var did2 = DocumentId.CreateNewId(pid2);
2611var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file1.cs");
2612var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file2.cs");
2635var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs");
2636var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId2), "file2.cs");
2662var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs");
2663var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId2), "file2.cs");
2687var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file1.cs");
2688var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file2.cs");
2708var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs");
2709var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId2), "file2.cs");
2730var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs");
2749var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.txt");
2768var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), ".editorconfig");
2802var doc1 = DocumentId.CreateNewId(pm1);
2803var doc2 = DocumentId.CreateNewId(pm2);
2828.AddDocument(DocumentId.CreateNewId(pm1), "goo.cs", "public class X { }")
2829.AddDocument(DocumentId.CreateNewId(pm2), "bar.vb", "Public Class Y\r\nInherits X\r\nEnd Class");
3135var did = DocumentId.CreateNewId(pid);
3157var documentId = DocumentId.CreateNewId(projectId);
3179var did = DocumentId.CreateNewId(pid);
3217var did = DocumentId.CreateNewId(pid);
3258var documentId = DocumentId.CreateNewId(projectId);
3298var did = DocumentId.CreateNewId(pid);
3322var did = DocumentId.CreateNewId(pid);
3342var did = DocumentId.CreateNewId(pid);
3365var did = DocumentId.CreateNewId(pid);
3389var did = DocumentId.CreateNewId(pid);
3409var did = DocumentId.CreateNewId(pid);
3430var did = DocumentId.CreateNewId(pid);
3452var did = DocumentId.CreateNewId(pid);
3472var did = DocumentId.CreateNewId(pid);
3492var did = DocumentId.CreateNewId(pid);
3511var did = DocumentId.CreateNewId(pid);
3542var did = DocumentId.CreateNewId(pid);
3573var did = DocumentId.CreateNewId(pid);
3599var did = DocumentId.CreateNewId(pid);
3626var did = DocumentId.CreateNewId(pid);
3650var did = DocumentId.CreateNewId(pid);
3715var did = DocumentId.CreateNewId(pid);
3740var did = DocumentId.CreateNewId(pid);
3769var did = DocumentId.CreateNewId(pid);
3908var did = DocumentId.CreateNewId(pid);
3935var did1 = DocumentId.CreateNewId(pid1);
3936var did2 = DocumentId.CreateNewId(pid2);
3937var did3 = DocumentId.CreateNewId(pid3);
4353var documentId1 = DocumentId.CreateNewId(solution.ProjectIds.Single());
4354var documentId2 = DocumentId.CreateNewId(solution.ProjectIds.Single());
4355var documentId3 = DocumentId.CreateNewId(solution.ProjectIds.Single());
4576var did1 = DocumentId.CreateNewId(pid);
4580var did2 = DocumentId.CreateNewId(pid);
4584var did3 = DocumentId.CreateNewId(pid);
4588var did4 = DocumentId.CreateNewId(pid);
4592var did5 = DocumentId.CreateNewId(pid);
4640var did1 = DocumentId.CreateNewId(pid);
4644var did2 = DocumentId.CreateNewId(pid);
4648var did3 = DocumentId.CreateNewId(pid);
4652var did4 = DocumentId.CreateNewId(pid);
4656var did5 = DocumentId.CreateNewId(pid);
4674var sourceDocumentId = DocumentId.CreateNewId(projectId);
4682var editorConfigDocumentId = DocumentId.CreateNewId(projectId);
4710var sourceDocumentId = DocumentId.CreateNewId(projectId);
4715var editorConfigDocumentId = DocumentId.CreateNewId(projectId);
4751var sourceDocumentId = DocumentId.CreateNewId(projectId);
4756var editorConfigDocumentId = DocumentId.CreateNewId(projectId);
4796var sourceDocumentId = DocumentId.CreateNewId(projectId);
4804var editorConfigDocumentId = DocumentId.CreateNewId(projectId);
4827var sourceDocumentId = DocumentId.CreateNewId(projectId);
4850var editorConfigDocumentId = DocumentId.CreateNewId(projectId);
4878var documentId = DocumentId.CreateNewId(projectId);
4898var documentId = DocumentId.CreateNewId(projectId);
4919var documentId = DocumentId.CreateNewId(projectId);
4937var editorConfigDocumentId = DocumentId.CreateNewId(projectId);
5423var docInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "c.cs", loader: TextLoader.From(TextAndVersion.Create(text, version)));
5513var documentId = DocumentId.CreateNewId(projectId);
5518.AddAnalyzerConfigDocument(DocumentId.CreateNewId(projectId), ".editorconfig", SourceText.From($"[{pattern}]\nindent_style = tab"), filePath: configPath);
WorkspaceTests\AdhocWorkspaceTests.cs (6)
59var info = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "code.cs");
153DocumentId.CreateNewId(pid),
215var docInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "c.cs", loader: TextLoader.From(TextAndVersion.Create(text, version)));
249var docInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "c.cs", loader: TextLoader.From(TextAndVersion.Create(text, version)));
285DocumentId.CreateNewId(pid),
322var docInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "c.cs", loader: TextLoader.From(TextAndVersion.Create(text, version)));
Microsoft.VisualStudio.LanguageServices (2)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (9)
Microsoft.VisualStudio.LanguageServices.LiveShare (2)
Roslyn.VisualStudio.Next.UnitTests (3)