4 instantiations of DocumentInfo
Microsoft.CodeAnalysis.Workspaces (4)
344 references to DocumentInfo
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (7)
Microsoft.CodeAnalysis.Features (16)
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
Microsoft.CodeAnalysis.Features.UnitTests (13)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (4)
Microsoft.CodeAnalysis.Remote.ServiceHub (6)
Microsoft.CodeAnalysis.Remote.Workspaces (5)
Microsoft.CodeAnalysis.Workspaces (116)
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)
125public IReadOnlyList<DocumentInfo> Documents { get; }
145public IReadOnlyList<DocumentInfo> AdditionalDocuments { get; }
150public IReadOnlyList<DocumentInfo> AnalyzerConfigDocuments { get; }
161IReadOnlyList<DocumentInfo> documents,
165IReadOnlyList<DocumentInfo> additionalDocuments,
166IReadOnlyList<DocumentInfo> analyzerConfigDocuments,
195IEnumerable<DocumentInfo>? documents,
199IEnumerable<DocumentInfo>? additionalDocuments,
223IEnumerable<DocumentInfo>? documents = null,
227IEnumerable<DocumentInfo>? additionalDocuments = null,
256analyzerConfigDocuments: SpecializedCollections.EmptyBoxedImmutableArray<DocumentInfo>(),
264IEnumerable<DocumentInfo>? documents = null,
268IEnumerable<DocumentInfo>? additionalDocuments = null,
269IEnumerable<DocumentInfo>? analyzerConfigDocuments = null,
289IReadOnlyList<DocumentInfo>? documents = null,
293IReadOnlyList<DocumentInfo>? additionalDocuments = null,
294IReadOnlyList<DocumentInfo>? analyzerConfigDocuments = null,
377public ProjectInfo WithDocuments(IEnumerable<DocumentInfo>? documents)
380public ProjectInfo WithAdditionalDocuments(IEnumerable<DocumentInfo>? additionalDocuments)
383public ProjectInfo WithAnalyzerConfigDocuments(IEnumerable<DocumentInfo>? analyzerConfigDocuments)
Workspace\Solution\Solution.cs (11)
998=> AddDocument(DocumentInfo.Create(
1024return AddDocument(DocumentInfo.Create(
1036public Solution AddDocument(DocumentInfo documentInfo)
1044public Solution AddDocuments(ImmutableArray<DocumentInfo> documentInfos)
1075var info = CreateDocumentInfo(documentId, name, text, folders, filePath);
1079public Solution AddAdditionalDocument(DocumentInfo documentInfo)
1082public Solution AddAdditionalDocuments(ImmutableArray<DocumentInfo> documentInfos)
1109var info = CreateDocumentInfo(documentId, name, text, folders, filePath);
1113private DocumentInfo CreateDocumentInfo(DocumentId documentId, string name, SourceText text, IEnumerable<string>? folders, string? filePath)
1119return DocumentInfo.Create(
1134public 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)
1101var newDocumentInfo1 = DocumentInfo.Create(
1110var newDocumentInfo3 = DocumentInfo.Create(
1120var newAddDocumentInfo1 = DocumentInfo.Create(
1129var newAddDocumentInfo3 = DocumentInfo.Create(
1139var newConfigDocumentInfo1 = DocumentInfo.Create(
1148var newConfigDocumentInfo3 = DocumentInfo.Create(
1623solution = solution.AddDocument(DocumentInfo.Create(documentAId, "a.cs", loader: textLoaderA, filePath: "a.cs"));
1626solution = solution.AddDocument(DocumentInfo.Create(fileDocumentId, "d.cs", loader: new FileTextLoader(fileD.Path, defaultEncoding: null), filePath: fileD.Path));
2635var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file1.cs");
2636var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file2.cs");
2659var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs");
2660var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId2), "file2.cs");
2686var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs");
2687var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId2), "file2.cs");
2711var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file1.cs");
2712var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file2.cs");
2732var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs");
2733var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId2), "file2.cs");
2754var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs");
2773var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.txt");
2792var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), ".editorconfig");
4725DocumentInfo.Create(
4758DocumentInfo.Create(
4799DocumentInfo.Create(
4847DocumentInfo.Create(
4893DocumentInfo.Create(
4943.AddDocument(DocumentInfo.Create(documentId, "Test", sourceCodeKind: SourceCodeKind.Script));
4984.WithAnalyzerConfigDocuments([DocumentInfo.Create(editorConfigDocumentId, ".editorconfig", filePath: editorConfigFilePath)]);
5481var 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)