3 instantiations of DocumentInfo
Microsoft.CodeAnalysis.Workspaces (3)
337 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 (11)
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)
119public IReadOnlyList<DocumentInfo> Documents { get; }
139public IReadOnlyList<DocumentInfo> AdditionalDocuments { get; }
144public IReadOnlyList<DocumentInfo> AnalyzerConfigDocuments { get; }
155IReadOnlyList<DocumentInfo> documents,
159IReadOnlyList<DocumentInfo> additionalDocuments,
160IReadOnlyList<DocumentInfo> analyzerConfigDocuments,
189IEnumerable<DocumentInfo>? documents,
193IEnumerable<DocumentInfo>? additionalDocuments,
217IEnumerable<DocumentInfo>? documents = null,
221IEnumerable<DocumentInfo>? additionalDocuments = null,
250analyzerConfigDocuments: SpecializedCollections.EmptyBoxedImmutableArray<DocumentInfo>(),
258IEnumerable<DocumentInfo>? documents = null,
262IEnumerable<DocumentInfo>? additionalDocuments = null,
263IEnumerable<DocumentInfo>? analyzerConfigDocuments = null,
283IReadOnlyList<DocumentInfo>? documents = null,
287IReadOnlyList<DocumentInfo>? additionalDocuments = null,
288IReadOnlyList<DocumentInfo>? analyzerConfigDocuments = null,
371public ProjectInfo WithDocuments(IEnumerable<DocumentInfo>? documents)
374public ProjectInfo WithAdditionalDocuments(IEnumerable<DocumentInfo>? additionalDocuments)
377public ProjectInfo WithAnalyzerConfigDocuments(IEnumerable<DocumentInfo>? analyzerConfigDocuments)
Workspace\Solution\Solution.cs (11)
964=> AddDocument(DocumentInfo.Create(
990return AddDocument(DocumentInfo.Create(
1002public Solution AddDocument(DocumentInfo documentInfo)
1010public Solution AddDocuments(ImmutableArray<DocumentInfo> documentInfos)
1041var info = CreateDocumentInfo(documentId, name, text, folders, filePath);
1045public Solution AddAdditionalDocument(DocumentInfo documentInfo)
1048public Solution AddAdditionalDocuments(ImmutableArray<DocumentInfo> documentInfos)
1075var info = CreateDocumentInfo(documentId, name, text, folders, filePath);
1079private DocumentInfo CreateDocumentInfo(DocumentId documentId, string name, SourceText text, IEnumerable<string>? folders, string? filePath)
1085return DocumentInfo.Create(
1100public 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)
1015var newDocumentInfo1 = DocumentInfo.Create(
1024var newDocumentInfo3 = DocumentInfo.Create(
1034var newAddDocumentInfo1 = DocumentInfo.Create(
1043var newAddDocumentInfo3 = DocumentInfo.Create(
1053var newConfigDocumentInfo1 = DocumentInfo.Create(
1062var newConfigDocumentInfo3 = DocumentInfo.Create(
1501solution = solution.AddDocument(DocumentInfo.Create(documentAId, "a.cs", loader: textLoaderA, filePath: "a.cs"));
1504solution = solution.AddDocument(DocumentInfo.Create(fileDocumentId, "d.cs", loader: new FileTextLoader(fileD.Path, defaultEncoding: null), filePath: fileD.Path));
2468var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file1.cs");
2469var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file2.cs");
2492var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs");
2493var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId2), "file2.cs");
2519var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs");
2520var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId2), "file2.cs");
2544var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file1.cs");
2545var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file2.cs");
2565var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs");
2566var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId2), "file2.cs");
2587var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs");
2606var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.txt");
2625var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), ".editorconfig");
4541DocumentInfo.Create(
4574DocumentInfo.Create(
4615DocumentInfo.Create(
4663DocumentInfo.Create(
4709DocumentInfo.Create(
4759.AddDocument(DocumentInfo.Create(documentId, "Test", sourceCodeKind: SourceCodeKind.Script));
4800.WithAnalyzerConfigDocuments([DocumentInfo.Create(editorConfigDocumentId, ".editorconfig", filePath: editorConfigFilePath)]);
5280var 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)