6 instantiations of DocumentInfo
Microsoft.CodeAnalysis.ExternalAccess.Razor (1)
RazorDynamicFileInfo.cs (1)
52return new DocumentInfo(existingDocumentInfo.Attributes, this.TextLoader, serviceProvider);
Microsoft.CodeAnalysis.Remote.Workspaces (1)
AbstractAssetProvider.cs (1)
95return new DocumentInfo(attributes, textLoader, documentServiceProvider: null);
Microsoft.CodeAnalysis.Workspaces (4)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
484var documentInfo = new DocumentInfo(attributes, fileInfo.TextLoader, fileInfo.DocumentServiceProvider);
Workspace\Solution\DocumentInfo.cs (2)
87return new DocumentInfo( 116return new DocumentInfo(newAttributes, newLoader, newDocumentServiceProvider);
Workspace\Workspace.cs (1)
1742new DocumentInfo(newDoc.State.Attributes, loader: null, documentServiceProvider: newDoc.State.Services));
354 references to DocumentInfo
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Formatting\RazorLineFormattingOptionsTests.cs (2)
57var documentInfo = DocumentInfo.Create(
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SymbolEditorTests.cs (1)
37DocumentInfo.Create(
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (10)
LanguageServer\AbstractLanguageServerProtocolTests.cs (2)
404var generatedDocumentInfo = DocumentInfo.Create(
Rename\RenamerTests.cs (2)
225var documentInfo = DocumentInfo.Create(
Workspaces\TestHostDocument.cs (2)
358public DocumentInfo ToDocumentInfo() 361return DocumentInfo.Create(Id, Name, Folders, SourceCodeKind, Loader, FilePath, isGenerated: false)
Workspaces\TestWorkspace.cs (4)
335protected override void ApplyDocumentAdded(DocumentInfo info, SourceText text) 360protected override void ApplyAdditionalDocumentAdded(DocumentInfo info, SourceText text) 382protected override void ApplyAnalyzerConfigDocumentAdded(DocumentInfo info, SourceText text) 771public Task AddDocumentAsync(DocumentInfo documentInfo)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (43)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (3)
362DocumentInfo.Create( 485DocumentInfo.Create( 583DocumentInfo.Create(
EditAndContinue\CompileTimeSolutionProviderTests.cs (1)
54AddDocument(DocumentInfo.Create(
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (16)
393private static DocumentInfo CreateDesignTimeOnlyDocument(ProjectId projectId, string name = "design-time-only.cs", string path = "design-time-only.cs") 396return DocumentInfo.Create( 533solution = solution.AddDocument(DocumentInfo.Create( 540solution = solution.AddDocument(DocumentInfo.Create( 547solution = solution.AddDocument(DocumentInfo.Create( 554solution = solution.AddDocument(DocumentInfo.Create( 575solution = solution.AddDocument(DocumentInfo.Create( 718var documentInfo = CreateDesignTimeOnlyDocument(document1.Project.Id); 753var documentInfo = DocumentInfo.Create( 3715var documentInfo = DocumentInfo.Create( 4477solution = solution.AddDocument(DocumentInfo.Create( 4564solution = solution.AddDocument(DocumentInfo.Create( 4631solution = solution.AddDocument(DocumentInfo.Create( 4696AddDocument(DocumentInfo.Create(
SolutionCrawler\WorkCoordinatorTests.cs (22)
101DocumentInfo.Create(DocumentId.CreateNewId(projectId), "D1") 221documents: new List<DocumentInfo> 223DocumentInfo.Create(DocumentId.CreateNewId(projectId), "D1"), 224DocumentInfo.Create(DocumentId.CreateNewId(projectId), "D2") 565var info = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "D6"); 626var info = solution.Projects[0].Documents[0]; 652var info = solution.Projects[0].Documents[0]; 736var ncfile = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "D6"); 779var analyzerConfigFile = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), ".editorconfig", filePath: analyzerConfigDocFilePath); 1303var info = DocumentInfo.Create(DocumentId.CreateNewId(id), "D6"); 1418workspace.OnDocumentAdded(DocumentInfo.Create(DocumentId.CreateNewId(solution.Projects[0].Id), "D6")); 1625documents: new[] { DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "D1") }), 1627documents: new[] { DocumentInfo.Create(DocumentId.CreateNewId(projectId2), "D2") }, 1630documents: new[] { DocumentInfo.Create(DocumentId.CreateNewId(projectId3), "D3") }, 1633documents: new[] { DocumentInfo.Create(DocumentId.CreateNewId(projectId4), "D4") }), 1635documents: new[] { DocumentInfo.Create(DocumentId.CreateNewId(projectId5), "D5") }, 1657private static IEnumerable<DocumentInfo> GetDocuments(ProjectId projectId, int count) 1661yield return DocumentInfo.Create(DocumentId.CreateNewId(projectId), $"D{i + 1}");
TextEditor\OpenDocumentTests.cs (1)
43workspace.AddDocument(DocumentInfo.Create(documentId, "Foo.cs", filePath: FilePath));
Microsoft.CodeAnalysis.ExternalAccess.Razor (7)
IRazorLanguageServerFactory.cs (1)
16DocumentInfo CreateDocumentInfo(
RazorDynamicFileInfo.cs (4)
46/// Constructs a new <see cref="DocumentInfo"/> from an existing <see cref="DocumentInfo"/> but with updated 49public DocumentInfo ToUpdatedDocumentInfo(DocumentInfo existingDocumentInfo)
RazorLanguageServerFactoryWrapper.cs (2)
47public DocumentInfo CreateDocumentInfo( 66return DocumentInfo.Create(id, name, folders, sourceCodeKind, loader, filePath, isGenerated)
Microsoft.CodeAnalysis.Features (13)
CodeFixes\Configuration\ConfigurationUpdater.cs (2)
341var documentInfo = DocumentInfo.Create(
EditAndContinue\CommittedSolution.cs (1)
271_solution = _solution.AddDocument(DocumentInfo.Create(
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
357DocumentInfo.Create(
MetadataAsSource\MetadataAsSourceGeneratedFileInfo.cs (4)
77var assemblyInfoDocument = DocumentInfo.Create( 86var generatedDocument = DocumentInfo.Create(
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (3)
309private ImmutableArray<DocumentInfo> CreateDocumentInfos( 312using var _ = ArrayBuilder<DocumentInfo>.GetInstance(out var documents); 329documents.Add(DocumentInfo.Create(
Workspace\MiscellaneousFileUtilities.cs (2)
49var documentInfo = DocumentInfo.Create(
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (4)
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (2)
157var documentInfo = DocumentInfo.Create(
Workspaces\LspWorkspaceManagerTests.cs (2)
204var newDocumentInfo = DocumentInfo.Create(newDocumentId, "NewDoc.cs", filePath: newDocumentFilePath, loader: new TestTextLoader("New Doc"));
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator (2)
CompilerInvocation.cs (2)
103DocumentInfo CreateDocumentInfo(string unmappedPath) 106return DocumentInfo.Create(
Microsoft.CodeAnalysis.Remote.ServiceHub (7)
Host\RemoteWorkspace.SolutionCreator.cs (7)
364Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments, 392ImmutableArray<DocumentInfo>.Builder? lazyDocumentsToAdd = null; 397lazyDocumentsToAdd ??= ImmutableArray.CreateBuilder<DocumentInfo>(); 400var documentInfo = await _assetProvider.CreateDocumentInfoAsync(newDocumentChecksums.Checksum, cancellationToken).ConfigureAwait(false); 474var newDocumentInfo = await _assetProvider.GetAssetAsync<DocumentInfo.DocumentAttributes>(infoChecksum, cancellationToken).ConfigureAwait(false); 512var infos = await assetProvider.GetAssetsAsync<DocumentInfo.DocumentAttributes>(infoChecksums, cancellationToken).ConfigureAwait(false); 518var info = await assetProvider.GetAssetAsync<DocumentInfo.DocumentAttributes>(kv.Item2.Info, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Remote.Workspaces (4)
AbstractAssetProvider.cs (4)
85public async Task<DocumentInfo> CreateDocumentInfoAsync(Checksum documentChecksum, CancellationToken cancellationToken) 88var attributes = await GetAssetAsync<DocumentInfo.DocumentAttributes>(documentSnapshot.Info, cancellationToken).ConfigureAwait(false); 98private async Task<IEnumerable<DocumentInfo>> CreateDocumentInfosAsync(ChecksumCollection documentChecksums, CancellationToken cancellationToken) 100var documentInfos = new List<DocumentInfo>();
Microsoft.CodeAnalysis.Workspaces (109)
Serialization\SerializationExtensions.cs (1)
25DocumentInfo.DocumentAttributes _ => WellKnownSynchronizationKind.DocumentAttributes,
Serialization\SerializerService.cs (1)
190return (T)(object)DocumentInfo.DocumentAttributes.ReadFrom(reader);
Workspace\AdhocWorkspace.cs (2)
133return AddDocument(DocumentInfo.Create(id, name, loader: loader)); 139public Document AddDocument(DocumentInfo documentInfo)
Workspace\CommandLineProject.cs (6)
112var docs = new List<DocumentInfo>(); 127var doc = DocumentInfo.Create( 139var additionalDocs = new List<DocumentInfo>(); 154var doc = DocumentInfo.Create(
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (14)
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()); 484var documentInfo = new DocumentInfo(attributes, fileInfo.TextLoader, fileInfo.DocumentServiceProvider); 535Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments, 546foreach (var documentInfo in _documentsAddedInBatch) 576private DocumentInfo CreateDocumentInfoFromFileInfo(DynamicFileInfo fileInfo, ImmutableArray<string> folders) 586return DocumentInfo.Create(
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
537foreach (var document in documents)
Workspace\Solution\AdditionalDocumentState.cs (2)
19DocumentInfo.DocumentAttributes attributes, 29DocumentInfo documentInfo,
Workspace\Solution\AnalyzerConfigDocumentState.cs (2)
22DocumentInfo.DocumentAttributes attributes, 32DocumentInfo documentInfo,
Workspace\Solution\DocumentInfo.cs (11)
66/// Create a new instance of a <see cref="DocumentInfo"/>. 78public static DocumentInfo Create( 100private DocumentInfo With( 119public DocumentInfo WithId(DocumentId id) 122public DocumentInfo WithName(string name) 125public DocumentInfo WithFolders(IEnumerable<string>? folders) 128public DocumentInfo WithSourceCodeKind(SourceCodeKind kind) 131public DocumentInfo WithFilePath(string? filePath) 134public DocumentInfo WithTextLoader(TextLoader? loader) 137internal DocumentInfo WithDesignTimeOnly(bool designTimeOnly) 140internal DocumentInfo WithDocumentServiceProvider(IDocumentServiceProvider? provider)
Workspace\Solution\DocumentState.cs (4)
39DocumentInfo.DocumentAttributes attributes, 55DocumentInfo info, 410private DocumentState UpdateAttributes(DocumentInfo.DocumentAttributes attributes) 540DocumentInfo.DocumentAttributes attributes,
Workspace\Solution\ProjectInfo.cs (20)
123public IReadOnlyList<DocumentInfo> Documents { get; } 143public IReadOnlyList<DocumentInfo> AdditionalDocuments { get; } 148public IReadOnlyList<DocumentInfo> AnalyzerConfigDocuments { get; } 159IReadOnlyList<DocumentInfo> documents, 163IReadOnlyList<DocumentInfo> additionalDocuments, 164IReadOnlyList<DocumentInfo> analyzerConfigDocuments, 193IEnumerable<DocumentInfo>? documents, 197IEnumerable<DocumentInfo>? additionalDocuments, 221IEnumerable<DocumentInfo>? documents = null, 225IEnumerable<DocumentInfo>? additionalDocuments = null, 254analyzerConfigDocuments: SpecializedCollections.EmptyBoxedImmutableArray<DocumentInfo>(), 262IEnumerable<DocumentInfo>? documents = null, 266IEnumerable<DocumentInfo>? additionalDocuments = null, 267IEnumerable<DocumentInfo>? analyzerConfigDocuments = null, 287IReadOnlyList<DocumentInfo>? documents = null, 291IReadOnlyList<DocumentInfo>? additionalDocuments = null, 292IReadOnlyList<DocumentInfo>? analyzerConfigDocuments = null, 372public ProjectInfo WithDocuments(IEnumerable<DocumentInfo>? documents) 375public ProjectInfo WithAdditionalDocuments(IEnumerable<DocumentInfo>? additionalDocuments) 378public ProjectInfo WithAnalyzerConfigDocuments(IEnumerable<DocumentInfo>? analyzerConfigDocuments)
Workspace\Solution\ProjectState.cs (4)
137.WithDocuments(ImmutableArray<DocumentInfo>.Empty) 138.WithAdditionalDocuments(ImmutableArray<DocumentInfo>.Empty) 139.WithAnalyzerConfigDocuments(ImmutableArray<DocumentInfo>.Empty); 235internal DocumentState CreateDocument(DocumentInfo documentInfo, ParseOptions? parseOptions, LoadTextOptions loadTextOptions)
Workspace\Solution\Solution.cs (11)
1052=> AddDocument(DocumentInfo.Create( 1078return AddDocument(DocumentInfo.Create( 1090public Solution AddDocument(DocumentInfo documentInfo) 1098public Solution AddDocuments(ImmutableArray<DocumentInfo> documentInfos) 1137var info = CreateDocumentInfo(documentId, name, text, folders, filePath); 1141public Solution AddAdditionalDocument(DocumentInfo documentInfo) 1144public Solution AddAdditionalDocuments(ImmutableArray<DocumentInfo> documentInfos) 1179var info = CreateDocumentInfo(documentId, name, text, folders, filePath); 1183private DocumentInfo CreateDocumentInfo(DocumentId documentId, string name, SourceText text, IEnumerable<string>? folders, string? filePath) 1189return DocumentInfo.Create( 1204public Solution AddAnalyzerConfigDocuments(ImmutableArray<DocumentInfo> documentInfos)
Workspace\Solution\SolutionState.cs (7)
1058public SolutionState AddDocuments(ImmutableArray<DocumentInfo> documentInfos) 1066/// Core helper that takes a set of <see cref="DocumentInfo" />s and does the application of the appropriate documents to each project. 1072ImmutableArray<DocumentInfo> documentInfos, 1073Func<DocumentInfo, ProjectState, T> createDocumentState, 1100foreach (var documentInfo in documentInfosInProject) 1117public SolutionState AddAdditionalDocuments(ImmutableArray<DocumentInfo> documentInfos) 1124public SolutionState AddAnalyzerConfigDocuments(ImmutableArray<DocumentInfo> documentInfos)
Workspace\Solution\SourceGeneratedDocumentState.cs (2)
37new DocumentInfo.DocumentAttributes( 55DocumentInfo.DocumentAttributes attributes,
Workspace\Solution\TextDocumentState.cs (3)
28public DocumentInfo.DocumentAttributes Attributes { get; } 38DocumentInfo.DocumentAttributes attributes, 58public TextDocumentState(SolutionServices solutionServices, DocumentInfo info, LoadTextOptions loadTextOptions)
Workspace\Solution\TextDocumentStates.cs (2)
51public TextDocumentStates(IEnumerable<DocumentInfo> infos, Func<DocumentInfo, TState> stateConstructor)
Workspace\Workspace.cs (16)
817protected internal void OnDocumentAdded(DocumentInfo documentInfo) 827protected internal void OnDocumentsAdded(ImmutableArray<DocumentInfo> documentInfos) 844protected internal void OnDocumentReloaded(DocumentInfo newDocumentInfo) 881protected internal void OnDocumentInfoChanged(DocumentId documentId, DocumentInfo newInfo) 1112protected internal void OnAdditionalDocumentAdded(DocumentInfo documentInfo) 1150protected internal void OnAnalyzerConfigDocumentAdded(DocumentInfo documentInfo) 1651var info = CreateDocumentInfoWithoutText(document); 1660var info = CreateDocumentInfoWithoutText(document); 1669var info = CreateDocumentInfoWithoutText(document); 1770private static DocumentInfo CreateDocumentInfoWithText(TextDocument doc) 1773internal static DocumentInfo CreateDocumentInfoWithoutText(TextDocument doc) 1774=> DocumentInfo.Create( 1935protected virtual void ApplyDocumentAdded(DocumentInfo info, SourceText text) 1968protected virtual void ApplyDocumentInfoChanged(DocumentId id, DocumentInfo info) 1979protected virtual void ApplyAdditionalDocumentAdded(DocumentInfo info, SourceText text) 2012protected virtual void ApplyAnalyzerConfigDocumentAdded(DocumentInfo info, SourceText text)
Microsoft.CodeAnalysis.Workspaces.MSBuild (8)
MSBuild\MSBuildProjectLoader.Worker.cs (6)
442private ImmutableArray<DocumentInfo> CreateDocumentInfos(IReadOnlyList<DocumentFileInfo> documentFileInfos, ProjectId projectId, Encoding? encoding) 444var results = ImmutableArray.CreateBuilder<DocumentInfo>(); 450var documentInfo = DocumentInfo.Create( 485private void CheckForDuplicateDocuments(ImmutableArray<DocumentInfo> documents, string? projectFilePath, ProjectId projectId) 488foreach (var doc in documents)
MSBuild\MSBuildWorkspace.cs (2)
431protected override void ApplyDocumentAdded(DocumentInfo info, SourceText text) 453var newDocumentInfo = info.WithName(fileName)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
VisualStudioMSBuildWorkspaceTests.cs (2)
2359var doc = infos[0].Documents[0]; 2362var adoc = infos[0].AdditionalDocuments.First(a => a.Name == "XamlFile.xaml");
Microsoft.CodeAnalysis.Workspaces.UnitTests (113)
CommandLineProject\CommandLineProjectTests.cs (10)
27var docInfo = info.Documents.First(); 58var docInfo = info.Documents.First(); 69var docInfo = info.Documents.First(); 81var docInfo = info.Documents.First(); 92var docInfo = info.Documents.First(); 104var docInfo = info.Documents.First(); 115var docInfo = info.Documents.First(); 126var firstDoc = info.Documents.Single(); 127var secondDoc = info.AdditionalDocuments.Single(); 141var firstDoc = info.Documents.Single();
SolutionTests\DocumentInfoTests.cs (19)
26Assert.Throws<ArgumentNullException>(() => DocumentInfo.Create(id: null, "doc")); 27Assert.Throws<ArgumentNullException>(() => DocumentInfo.Create(documentId, name: null)); 29Assert.Throws<ArgumentNullException>(() => DocumentInfo.Create(documentId, "doc", folders: new[] { "folder", null })); 38var info = DocumentInfo.Create( 57var info = DocumentInfo.Create( 76var info1 = DocumentInfo.Create(documentId, "doc", folders: new[] { "folder" }); 79var info2 = DocumentInfo.Create(documentId, "doc"); 82var info3 = DocumentInfo.Create(documentId, "doc", folders: new string[0]); 85var info4 = DocumentInfo.Create(documentId, "doc", folders: ImmutableArray<string>.Empty); 98var info = DocumentInfo.Create(DocumentId.CreateNewId(ProjectId.CreateNewId()), "doc_name", filePath: path, sourceCodeKind: kind); 108var instance = DocumentInfo.Create(DocumentId.CreateNewId(ProjectId.CreateNewId()), "doc");
SolutionTests\ProjectInfoTests.cs (22)
29documents: new DocumentInfo[] { null })); 37var documentInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "doc"); 42additionalDocuments: new DocumentInfo[] { null })); 73var documentInfo = DocumentInfo.Create(DocumentId.CreateNewId(ProjectId.CreateNewId()), "doc"); 76Assert.Same(documentInfo, ((ImmutableArray<DocumentInfo>)info1.Documents).Single()); 79Assert.True(((ImmutableArray<DocumentInfo>)info2.Documents).IsEmpty); 81var info3 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", documents: new DocumentInfo[0]); 82Assert.True(((ImmutableArray<DocumentInfo>)info3.Documents).IsEmpty); 84var info4 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", documents: ImmutableArray<DocumentInfo>.Empty); 85Assert.True(((ImmutableArray<DocumentInfo>)info4.Documents).IsEmpty); 92var documentInfo = DocumentInfo.Create(DocumentId.CreateNewId(ProjectId.CreateNewId()), "doc"); 95Assert.Same(documentInfo, ((ImmutableArray<DocumentInfo>)info1.AdditionalDocuments).Single()); 98Assert.True(((ImmutableArray<DocumentInfo>)info2.AdditionalDocuments).IsEmpty); 100var info3 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", additionalDocuments: new DocumentInfo[0]); 101Assert.True(((ImmutableArray<DocumentInfo>)info3.AdditionalDocuments).IsEmpty); 103var info4 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", additionalDocuments: ImmutableArray<DocumentInfo>.Empty); 104Assert.True(((ImmutableArray<DocumentInfo>)info4.AdditionalDocuments).IsEmpty); 182var documentInfo = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "doc");
SolutionTests\SolutionTests.cs (36)
1120solution = solution.AddDocument(DocumentInfo.Create(documentAId, "a.cs", loader: textLoaderA, filePath: "a.cs")); 1123solution = solution.AddDocument(DocumentInfo.Create(fileDocumentId, "d.cs", loader: new FileTextLoader(fileD.Path, defaultEncoding: null), filePath: fileD.Path)); 1964var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file1.cs"); 1965var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file2.cs"); 1988var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs"); 1989var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId2), "file2.cs"); 2015var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs"); 2016var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId2), "file2.cs"); 2040var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file1.cs"); 2041var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file2.cs"); 2061var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs"); 2062var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId2), "file2.cs"); 2083var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs"); 2102var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.txt"); 2121var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), ".editorconfig"); 3931DocumentInfo.Create( 3965DocumentInfo.Create( 4007DocumentInfo.Create( 4055DocumentInfo.Create( 4101DocumentInfo.Create( 4172.WithAnalyzerConfigDocuments(new[] { DocumentInfo.Create(editorConfigDocumentId, ".editorconfig", filePath: editorConfigFilePath) }); 4294var docInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "c.cs", loader: TextLoader.From(TextAndVersion.Create(text, version)));
SolutionTests\SolutionWithSourceGeneratorTests.cs (2)
797var documentInfo = DocumentInfo.Create(
WorkspaceTests\AdhocWorkspaceTests.cs (12)
62var info = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "code.cs"); 155var docInfo = DocumentInfo.Create( 218var docInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "c.cs", loader: TextLoader.From(TextAndVersion.Create(text, version))); 252var docInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "c.cs", loader: TextLoader.From(TextAndVersion.Create(text, version))); 287var docInfo = DocumentInfo.Create( 346var docInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "c.cs", loader: TextLoader.From(TextAndVersion.Create(text, version)));
WorkspaceTests\WorkspaceReferenceTests.cs (10)
36var info = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "code.cs"); 76var info = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "code.cs"); 116var info = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "code.cs"); 156var referenceDocumentInfo = DocumentInfo.Create(DocumentId.CreateNewId(referenceProject.Id), "code.cs"); 160var info = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "code.cs");
WorkspaceTests\WorkspaceTests.cs (2)
170return this.AddDocument(DocumentInfo.Create(id, name, loader: loader)); 176public Document AddDocument(DocumentInfo documentInfo)
Microsoft.VisualStudio.LanguageServices (15)
Implementation\AbstractEditorFactory.cs (1)
331DocumentInfo.Create(
ProjectSystem\VisualStudioWorkspaceImpl.AbstractAddDocumentUndoUnit.cs (2)
15protected readonly DocumentInfo DocumentInfo; 20DocumentInfo docInfo,
ProjectSystem\VisualStudioWorkspaceImpl.AddAdditionalDocumentUndoUnit.cs (1)
17DocumentInfo docInfo,
ProjectSystem\VisualStudioWorkspaceImpl.AddAnalyzerConfigDocumentUndoUnit.cs (1)
16DocumentInfo docInfo,
ProjectSystem\VisualStudioWorkspaceImpl.AddDocumentUndoUnit.cs (1)
16DocumentInfo docInfo,
ProjectSystem\VisualStudioWorkspaceImpl.cs (8)
766protected override void ApplyDocumentAdded(DocumentInfo info, SourceText text) 769protected override void ApplyAdditionalDocumentAdded(DocumentInfo info, SourceText text) 772protected override void ApplyAnalyzerConfigDocumentAdded(DocumentInfo info, SourceText text) 775private void AddDocumentCore(DocumentInfo info, SourceText initialText, TextDocumentKind documentKind) 973var docInfo = CreateDocumentInfoWithoutText(document); 1165protected override void ApplyDocumentInfoChanged(DocumentId documentId, DocumentInfo updatedInfo) 1222/// The <see cref="VisualStudioWorkspace"/> currently supports only a subset of <see cref="DocumentInfo"/> 1225private static void FailIfDocumentInfoChangesNotSupported(CodeAnalysis.Document document, DocumentInfo updatedInfo)
Venus\ContainedLanguage.cs (1)
119Workspace.OnDocumentAdded(DocumentInfo.Create(
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
PersistentStorage\AbstractPersistentStorageTests.cs (1)
998solution = solution.AddDocument(DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "Document1",
Microsoft.VisualStudio.LanguageServices.LiveShare (3)
Client\Projects\RoslynRemoteProjectInfoProvider.cs (1)
93DocumentInfo.Create(
Client\RemoteLanguageServiceWorkspace.cs (2)
350var docInfo = DocumentInfo.Create(
Microsoft.VisualStudio.LanguageServices.UnitTests (2)
SolutionExplorer\SourceGeneratorItemTests.vb (2)
176DocumentInfo.Create( 186DocumentInfo.Create(
Roslyn.VisualStudio.Next.UnitTests (8)
Remote\SerializationValidator.cs (1)
184var info = await VerifyAssetSerializationAsync<DocumentInfo.DocumentAttributes>(
Remote\SnapshotSerializationTests.cs (1)
75DocumentInfo.Create(
Services\SolutionServiceTests.cs (6)
245var additionalDocumentInfo = DocumentInfo.Create( 276var analyzerConfigDocumentInfo = DocumentInfo.Create( 309var documentInfo = DocumentInfo.Create(