3 instantiations of DocumentInfo
Microsoft.CodeAnalysis.Workspaces (3)
336 references to DocumentInfo
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
Microsoft.CodeAnalysis.ExternalAccess.Razor (7)
Microsoft.CodeAnalysis.Features (14)
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
Microsoft.CodeAnalysis.Features.UnitTests (10)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (4)
Microsoft.CodeAnalysis.Remote.ServiceHub (6)
Microsoft.CodeAnalysis.Remote.Workspaces (5)
Microsoft.CodeAnalysis.Workspaces (111)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (16)
54private readonly ImmutableArray<DocumentInfo>.Builder _documentsAddedInBatch = ImmutableArray.CreateBuilder<DocumentInfo>();
67private readonly Action<Workspace, DocumentInfo> _documentAddAction;
74Action<Workspace, DocumentInfo> documentAddAction,
96var documentInfo = DocumentInfo.Create(
146var documentInfo = DocumentInfo.Create(
197var documentInfo = CreateDocumentInfoFromFileInfo(fileInfo, folders.NullToEmpty());
486var documentInfo = new DocumentInfo(attributes, fileInfo.TextLoader, fileInfo.DocumentServiceProvider);
541Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments,
556Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments,
561ImmutableArray<DocumentInfo> documentsAddedInBatch,
574foreach (var documentInfo in documentsAddedInBatch)
610private DocumentInfo CreateDocumentInfoFromFileInfo(DynamicFileInfo fileInfo, ImmutableArray<string> folders)
620return DocumentInfo.Create(
Workspace\Solution\ProjectInfo.cs (20)
124public IReadOnlyList<DocumentInfo> Documents { get; }
144public IReadOnlyList<DocumentInfo> AdditionalDocuments { get; }
149public IReadOnlyList<DocumentInfo> AnalyzerConfigDocuments { get; }
160IReadOnlyList<DocumentInfo> documents,
164IReadOnlyList<DocumentInfo> additionalDocuments,
165IReadOnlyList<DocumentInfo> analyzerConfigDocuments,
194IEnumerable<DocumentInfo>? documents,
198IEnumerable<DocumentInfo>? additionalDocuments,
222IEnumerable<DocumentInfo>? documents = null,
226IEnumerable<DocumentInfo>? additionalDocuments = null,
255analyzerConfigDocuments: SpecializedCollections.EmptyBoxedImmutableArray<DocumentInfo>(),
263IEnumerable<DocumentInfo>? documents = null,
267IEnumerable<DocumentInfo>? additionalDocuments = null,
268IEnumerable<DocumentInfo>? analyzerConfigDocuments = null,
288IReadOnlyList<DocumentInfo>? documents = null,
292IReadOnlyList<DocumentInfo>? additionalDocuments = null,
293IReadOnlyList<DocumentInfo>? analyzerConfigDocuments = null,
376public ProjectInfo WithDocuments(IEnumerable<DocumentInfo>? documents)
379public ProjectInfo WithAdditionalDocuments(IEnumerable<DocumentInfo>? additionalDocuments)
382public ProjectInfo WithAnalyzerConfigDocuments(IEnumerable<DocumentInfo>? analyzerConfigDocuments)
Workspace\Solution\Solution.cs (11)
975=> AddDocument(DocumentInfo.Create(
1001return AddDocument(DocumentInfo.Create(
1013public Solution AddDocument(DocumentInfo documentInfo)
1021public Solution AddDocuments(ImmutableArray<DocumentInfo> documentInfos)
1052var info = CreateDocumentInfo(documentId, name, text, folders, filePath);
1056public Solution AddAdditionalDocument(DocumentInfo documentInfo)
1059public Solution AddAdditionalDocuments(ImmutableArray<DocumentInfo> documentInfos)
1086var info = CreateDocumentInfo(documentId, name, text, folders, filePath);
1090private DocumentInfo CreateDocumentInfo(DocumentId documentId, string name, SourceText text, IEnumerable<string>? folders, string? filePath)
1096return DocumentInfo.Create(
1111public Solution AddAnalyzerConfigDocuments(ImmutableArray<DocumentInfo> documentInfos)
Microsoft.CodeAnalysis.Workspaces.MSBuild (8)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (6)
Microsoft.CodeAnalysis.Workspaces.UnitTests (121)
SolutionTests\DocumentInfoTests.cs (19)
24Assert.Throws<ArgumentNullException>(() => DocumentInfo.Create(id: null, "doc"));
25Assert.Throws<ArgumentNullException>(() => DocumentInfo.Create(documentId, name: null));
27Assert.Throws<ArgumentNullException>(() => DocumentInfo.Create(documentId, "doc", folders: ["folder", null]));
36var info = DocumentInfo.Create(
55var info = DocumentInfo.Create(
74var info1 = DocumentInfo.Create(documentId, "doc", folders: ["folder"]);
77var info2 = DocumentInfo.Create(documentId, "doc");
80var info3 = DocumentInfo.Create(documentId, "doc", folders: []);
83var info4 = DocumentInfo.Create(documentId, "doc", folders: []);
96var info = DocumentInfo.Create(DocumentId.CreateNewId(ProjectId.CreateNewId()), "doc_name", filePath: path, sourceCodeKind: kind);
106var instance = DocumentInfo.Create(DocumentId.CreateNewId(ProjectId.CreateNewId()), "doc");
SolutionTests\SolutionTests.cs (49)
1103var newDocumentInfo1 = DocumentInfo.Create(
1112var newDocumentInfo3 = DocumentInfo.Create(
1122var newAddDocumentInfo1 = DocumentInfo.Create(
1131var newAddDocumentInfo3 = DocumentInfo.Create(
1141var newConfigDocumentInfo1 = DocumentInfo.Create(
1150var newConfigDocumentInfo3 = DocumentInfo.Create(
1625solution = solution.AddDocument(DocumentInfo.Create(documentAId, "a.cs", loader: textLoaderA, filePath: "a.cs"));
1628solution = solution.AddDocument(DocumentInfo.Create(fileDocumentId, "d.cs", loader: new FileTextLoader(fileD.Path, defaultEncoding: null), filePath: fileD.Path));
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");
4684DocumentInfo.Create(
4717DocumentInfo.Create(
4758DocumentInfo.Create(
4806DocumentInfo.Create(
4852DocumentInfo.Create(
4902.AddDocument(DocumentInfo.Create(documentId, "Test", sourceCodeKind: SourceCodeKind.Script));
4943.WithAnalyzerConfigDocuments([DocumentInfo.Create(editorConfigDocumentId, ".editorconfig", filePath: editorConfigFilePath)]);
5423var docInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "c.cs", loader: TextLoader.From(TextAndVersion.Create(text, version)));
WorkspaceTests\AdhocWorkspaceTests.cs (12)
59var info = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "code.cs");
152var docInfo = DocumentInfo.Create(
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)));
284var docInfo = DocumentInfo.Create(
322var docInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "c.cs", loader: TextLoader.From(TextAndVersion.Create(text, version)));
Microsoft.VisualStudio.LanguageServices (16)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Microsoft.VisualStudio.LanguageServices.LiveShare (3)
Microsoft.VisualStudio.LanguageServices.UnitTests (2)
Roslyn.VisualStudio.Next.UnitTests (8)