6 instantiations of DocumentInfo
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
RazorDynamicFileInfo.cs (1)
52return new DocumentInfo(existingDocumentInfo.Attributes, this.TextLoader, serviceProvider);
Microsoft.CodeAnalysis.Remote.Workspaces (1)
AbstractAssetProvider.cs (1)
172return new DocumentInfo(attributes, textLoader, documentServiceProvider: null);
Microsoft.CodeAnalysis.Workspaces (4)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
511var documentInfo = new DocumentInfo(documentToReload.State.Attributes, fileInfo.TextLoader, fileInfo.DocumentServiceProvider);
Workspace\Solution\DocumentInfo.cs (2)
85return new DocumentInfo( 114return new DocumentInfo(newAttributes, newLoader, newDocumentServiceProvider);
Workspace\Workspace.cs (1)
1644new DocumentInfo(newDoc.DocumentState.Attributes, loader: null, documentServiceProvider: newDoc.State.DocumentServiceProvider));
353 references to DocumentInfo
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Formatting\RazorLineFormattingOptionsTests.cs (2)
58var documentInfo = DocumentInfo.Create(
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SymbolEditorTests.cs (1)
37DocumentInfo.Create(
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Rename\RenamerTests.cs (2)
225var documentInfo = DocumentInfo.Create(
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (2)
252DocumentInfo.Create( 328DocumentInfo.Create(
EditAndContinue\EditAndContinueLanguageServiceTests.cs (1)
375AddDocument(DocumentInfo.Create(
TextEditor\OpenDocumentTests.cs (1)
43workspace.AddDocument(DocumentInfo.Create(documentId, "Foo.cs", filePath: FilePath));
Microsoft.CodeAnalysis.ExternalAccess.HotReload (2)
Api\HotReloadMSBuildWorkspace.cs (2)
135ImmutableArray<DocumentInfo> MapDocuments(ProjectId mappedProjectId, IReadOnlyList<DocumentInfo> documents)
Microsoft.CodeAnalysis.ExternalAccess.HotReload.UnitTests (3)
HotReloadMSBuildWorkspaceTests.cs (3)
42DocumentInfo.Create( 79DocumentInfo.Create( 84DocumentInfo.Create(
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (7)
RazorDynamicFileInfo.cs (4)
46/// Constructs a new <see cref="DocumentInfo"/> from an existing <see cref="DocumentInfo"/> but with updated 49public DocumentInfo ToUpdatedDocumentInfo(DocumentInfo existingDocumentInfo)
Testing\AbstractRazorLanguageServerFactoryWrapper.cs (1)
19internal abstract DocumentInfo CreateDocumentInfo(
Testing\RazorTestLanguageServerFactory.cs (2)
41internal override DocumentInfo CreateDocumentInfo( 60return DocumentInfo.Create(id, name, folders, sourceCodeKind, loader, filePath, isGenerated)
Microsoft.CodeAnalysis.Features (16)
CodeFixes\Configuration\ConfigurationUpdater.cs (2)
331var documentInfo = DocumentInfo.Create(
EditAndContinue\CommittedSolution.cs (1)
286_solution = _solution.AddDocument(DocumentInfo.Create(
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
350DocumentInfo.Create(
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (4)
355var assemblyInfoDocument = DocumentInfo.Create( 365var generatedDocument = DocumentInfo.Create(
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (6)
260foreach (var documentInfo in documentInfos) 326private ImmutableArray<DocumentInfo> CreateDocumentInfos( 329using var _ = ArrayBuilder<DocumentInfo>.GetInstance(out var documents); 347var documentInfo = DocumentInfo.Create( 434internal record struct SourceDocumentInfo(DocumentId DocumentId, Encoding Encoding, SourceHashAlgorithm ChecksumAlgorithm, ProjectId SourceProjectId, Workspace SourceWorkspace, DocumentInfo DocumentInfo);
Workspace\MiscellaneousFileUtilities.cs (2)
71var documentInfo = DocumentInfo.Create(
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (2)
517internal static DocumentInfo CreateDesignTimeOnlyDocument(ProjectId projectId, string name = "design-time-only.cs", string path = "design-time-only.cs") 520return DocumentInfo.Create(
EditAndContinue\Extensions.cs (2)
105public static DocumentInfo CreateTestDocumentInfo(Solution solution, ProjectId projectId, string? source, string path, out DocumentId id) 118return DocumentInfo.Create(
Microsoft.CodeAnalysis.Features.UnitTests (12)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (11)
87solution = solution.AddDocument(DocumentInfo.Create( 94solution = solution.AddDocument(DocumentInfo.Create( 101solution = solution.AddDocument(DocumentInfo.Create( 108solution = solution.AddDocument(DocumentInfo.Create( 129solution = solution.AddDocument(DocumentInfo.Create( 859var documentInfo = CreateDesignTimeOnlyDocument(projectId); 894var documentInfo = DocumentInfo.Create( 4810var documentInfo = DocumentInfo.Create( 5650solution = solution.AddDocument(DocumentInfo.Create(
EditAndContinue\UnitTestingHotReloadServiceTests.cs (1)
40solution = solution.AddDocument(DocumentInfo.Create(
Microsoft.CodeAnalysis.LanguageServer (5)
FileBasedPrograms\CanonicalMiscFilesProjectLoader.cs (5)
96var newDocumentInfo = DocumentInfo.Create( 248private static async Task<ProjectInfo> GetForkedProjectInfoAsync(Project canonicalProject, DocumentInfo newDocumentInfo, SourceText documentText, IGlobalOptionService globalOptionService, CancellationToken cancellationToken) 281async Task<DocumentInfo> GetDocumentInfoAsync(TextDocument document, string? documentPath) => 282DocumentInfo.Create(
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
ExternalAccess\Razor\FormatNewFileHandler.cs (1)
56DocumentInfo.Create(
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
MiscellaneousFiles\LspMiscellaneousFilesWorkspaceTests.cs (1)
28DocumentInfo.Create(
Microsoft.CodeAnalysis.Remote.ServiceHub (7)
Host\RemoteWorkspace.SolutionCreator.cs (7)
429Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments, 460await _assetProvider.GetAssetsAsync<DocumentInfo.DocumentAttributes>( 474Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments, 481ImmutableArray<DocumentInfo>.Builder? lazyDocumentsToAdd = null; 486lazyDocumentsToAdd ??= ImmutableArray.CreateBuilder<DocumentInfo>(); 489var documentInfo = await _assetProvider.CreateDocumentInfoAsync( 570var newDocumentInfo = await _assetProvider.GetAssetAsync<DocumentInfo.DocumentAttributes>(
Microsoft.CodeAnalysis.Remote.Workspaces (5)
AbstractAssetProvider.cs (5)
120async Task<ImmutableArray<DocumentInfo>> CreateDocumentInfosAsync(DocumentChecksumsAndIds checksumsAndIds) 122var documentInfos = new FixedSizeArrayBuilder<DocumentInfo>(checksumsAndIds.Length); 150var attributesTask = this.GetAssetsAsync<DocumentInfo.DocumentAttributes>( 163public async Task<DocumentInfo> CreateDocumentInfoAsync( 166var attributes = await GetAssetAsync<DocumentInfo.DocumentAttributes>(new(AssetPathKind.DocumentAttributes, documentId), attributeChecksum, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces (116)
Serialization\SerializationExtensions.cs (1)
23DocumentInfo.DocumentAttributes => WellKnownSynchronizationKind.DocumentAttributes,
Serialization\SerializerService.cs (2)
103((DocumentInfo.DocumentAttributes)value).WriteTo(writer); 248WellKnownSynchronizationKind.DocumentAttributes => DocumentInfo.DocumentAttributes.ReadFrom(reader),
Workspace\AdhocWorkspace.cs (2)
128return AddDocument(DocumentInfo.Create(id, name, loader: loader)); 134public Document AddDocument(DocumentInfo documentInfo)
Workspace\CommandLineProject.cs (4)
145IList<DocumentInfo> CreateDocuments(ImmutableArray<CommandLineSourceFile> files) 147var documents = new List<DocumentInfo>(); 163var doc = DocumentInfo.Create(
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (16)
54private readonly ImmutableArray<DocumentInfo>.Builder _documentsAddedInBatch = ImmutableArray.CreateBuilder<DocumentInfo>(); 67private readonly Action<Workspace, DocumentInfo> _documentAddAction; 86Action<Workspace, DocumentInfo> documentAddAction, 108var documentInfo = DocumentInfo.Create( 158var documentInfo = DocumentInfo.Create( 209var documentInfo = CreateDocumentInfoFromFileInfo(fileInfo, folders.NullToEmpty()); 511var documentInfo = new DocumentInfo(documentToReload.State.Attributes, fileInfo.TextLoader, fileInfo.DocumentServiceProvider); 565Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments, 580Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments, 585ImmutableArray<DocumentInfo> documentsAddedInBatch, 598foreach (var documentInfo in documentsAddedInBatch) 634private DocumentInfo CreateDocumentInfoFromFileInfo(DynamicFileInfo fileInfo, ImmutableArray<string> folders) 644return DocumentInfo.Create(
Workspace\Solution\AdditionalDocumentState.cs (3)
18DocumentInfo.DocumentAttributes attributes, 28DocumentInfo documentInfo, 34protected override TextDocumentState UpdateAttributes(DocumentInfo.DocumentAttributes newAttributes)
Workspace\Solution\AnalyzerConfigDocumentState.cs (3)
20DocumentInfo.DocumentAttributes attributes, 34DocumentInfo documentInfo, 40protected override TextDocumentState UpdateAttributes(DocumentInfo.DocumentAttributes newAttributes)
Workspace\Solution\DocumentInfo.cs (11)
64/// Create a new instance of a <see cref="DocumentInfo"/>. 76public static DocumentInfo Create( 98private DocumentInfo With( 117public DocumentInfo WithId(DocumentId id) 120public DocumentInfo WithName(string name) 123public DocumentInfo WithFolders(IEnumerable<string>? folders) 126public DocumentInfo WithSourceCodeKind(SourceCodeKind kind) 129public DocumentInfo WithFilePath(string? filePath) 132public DocumentInfo WithTextLoader(TextLoader? loader) 135internal DocumentInfo WithDesignTimeOnly(bool designTimeOnly) 138internal DocumentInfo WithDocumentServiceProvider(IDocumentServiceProvider? provider)
Workspace\Solution\DocumentState.cs (5)
40DocumentInfo.DocumentAttributes attributes, 56DocumentInfo info, 399protected override TextDocumentState UpdateAttributes(DocumentInfo.DocumentAttributes newAttributes) 441public new DocumentState WithAttributes(DocumentInfo.DocumentAttributes newAttributes) 534DocumentInfo.DocumentAttributes attributes,
Workspace\Solution\DocumentState_LinkedFileReuse.cs (1)
101DocumentInfo.DocumentAttributes attributes,
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\ProjectState.cs (2)
294internal DocumentState CreateDocument(DocumentInfo documentInfo, ParseOptions? parseOptions, LoadTextOptions loadTextOptions) 306internal TDocumentState CreateDocument<TDocumentState>(DocumentInfo documentInfo)
Workspace\Solution\Solution.cs (11)
1035=> AddDocument(DocumentInfo.Create( 1061return AddDocument(DocumentInfo.Create( 1073public Solution AddDocument(DocumentInfo documentInfo) 1081public Solution AddDocuments(ImmutableArray<DocumentInfo> documentInfos) 1112var info = CreateDocumentInfo(documentId, name, text, folders, filePath); 1116public Solution AddAdditionalDocument(DocumentInfo documentInfo) 1119public Solution AddAdditionalDocuments(ImmutableArray<DocumentInfo> documentInfos) 1146var info = CreateDocumentInfo(documentId, name, text, folders, filePath); 1150private DocumentInfo CreateDocumentInfo(DocumentId documentId, string name, SourceText text, IEnumerable<string>? folders, string? filePath) 1156return DocumentInfo.Create( 1171public Solution AddAnalyzerConfigDocuments(ImmutableArray<DocumentInfo> documentInfos)
Workspace\Solution\SolutionCompilationState.cs (7)
623using var _1 = ArrayBuilder<DocumentInfo>.GetInstance(out var addedDocumentInfos); 632void UpdateDocuments<TDocumentState>(IReadOnlyList<DocumentInfo> newDocumentInfos) 642foreach (var newDocumentInfo in newDocumentInfos) 794Func<DocumentInfo.DocumentAttributes, TArg, DocumentInfo.DocumentAttributes> updateAttributes) 1775/// Core helper that takes a set of <see cref="DocumentInfo" />s and does the application of the appropriate documents to each project. 1779ImmutableArray<DocumentInfo> documentInfos)
Workspace\Solution\SolutionState.cs (2)
973Func<DocumentInfo.DocumentAttributes, TArg, DocumentInfo.DocumentAttributes> updateAttributes)
Workspace\Solution\SourceGeneratedDocumentState.cs (3)
115new DocumentInfo.DocumentAttributes( 136DocumentInfo.DocumentAttributes attributes, 162protected override TextDocumentState UpdateAttributes(DocumentInfo.DocumentAttributes newAttributes)
Workspace\Solution\TextDocumentState.cs (5)
20public readonly DocumentInfo.DocumentAttributes Attributes; 30DocumentInfo.DocumentAttributes attributes, 53public TextDocumentState WithDocumentInfo(DocumentInfo info) 58public TextDocumentState WithAttributes(DocumentInfo.DocumentAttributes newAttributes) 67protected abstract TextDocumentState UpdateAttributes(DocumentInfo.DocumentAttributes newAttributes);
Workspace\Solution\TextDocumentStates.cs (2)
75public TextDocumentStates(IEnumerable<DocumentInfo> infos, Func<DocumentInfo, TState> stateConstructor)
Workspace\Workspace.cs (16)
1036protected internal void OnDocumentAdded(DocumentInfo documentInfo) 1046protected internal void OnDocumentsAdded(ImmutableArray<DocumentInfo> documentInfos) 1063protected internal void OnDocumentReloaded(DocumentInfo newDocumentInfo) 1100protected internal void OnDocumentInfoChanged(DocumentId documentId, DocumentInfo newInfo) 1359protected internal void OnAdditionalDocumentAdded(DocumentInfo documentInfo) 1397protected internal void OnAnalyzerConfigDocumentAdded(DocumentInfo documentInfo) 1937var info = CreateDocumentInfoWithoutText(document); 1946var info = CreateDocumentInfoWithoutText(document); 1955var info = CreateDocumentInfoWithoutText(document); 2037private static DocumentInfo CreateDocumentInfoWithText(TextDocument doc) 2040internal static DocumentInfo CreateDocumentInfoWithoutText(TextDocument doc) 2041=> DocumentInfo.Create( 2202protected virtual void ApplyDocumentAdded(DocumentInfo info, SourceText text) 2235protected virtual void ApplyDocumentInfoChanged(DocumentId id, DocumentInfo info) 2246protected virtual void ApplyAdditionalDocumentAdded(DocumentInfo info, SourceText text) 2279protected virtual void ApplyAnalyzerConfigDocumentAdded(DocumentInfo info, SourceText text)
Microsoft.CodeAnalysis.Workspaces.MSBuild (8)
MSBuild\MSBuildProjectLoader.Worker.cs (6)
346private ImmutableArray<DocumentInfo> CreateDocumentInfos(IReadOnlyList<DocumentFileInfo> documentFileInfos, ProjectId projectId, Encoding? encoding) 348var results = new FixedSizeArrayBuilder<DocumentInfo>(documentFileInfos.Count); 354var documentInfo = DocumentInfo.Create( 389private void CheckForDuplicateDocuments(ImmutableArray<DocumentInfo> documents, string? projectFilePath, ProjectId projectId) 392foreach (var doc in documents)
MSBuild\MSBuildWorkspace.cs (2)
451protected override void ApplyDocumentAdded(DocumentInfo info, SourceText text) 472var newDocumentInfo = info.WithName(fileName)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (6)
Workspaces\TestHostDocument.cs (2)
203public DocumentInfo ToDocumentInfo() 206return DocumentInfo.Create(Id, Name, Folders, SourceCodeKind, Loader, FilePath, isGenerated: false)
Workspaces\TestWorkspace`1.cs (4)
376protected override void ApplyDocumentAdded(DocumentInfo info, SourceText text) 402protected override void ApplyAdditionalDocumentAdded(DocumentInfo info, SourceText text) 426protected override void ApplyAnalyzerConfigDocumentAdded(DocumentInfo info, SourceText text) 534public Task AddDocumentAsync(DocumentInfo documentInfo)
Microsoft.CodeAnalysis.Workspaces.UnitTests (123)
CommandLineProject\CommandLineProjectTests.cs (11)
27var docInfo = info.Documents.First(); 57var docInfo = info.Documents.First(); 68var docInfo = info.Documents.First(); 80var docInfo = info.Documents.First(); 91var docInfo = info.Documents.First(); 103var docInfo = info.Documents.First(); 114var docInfo = info.Documents.First(); 125var firstDoc = info.Documents.Single(); 126var secondDoc = info.AdditionalDocuments.Single(); 137var document = Assert.Single(info.AnalyzerConfigDocuments); 151var firstDoc = info.Documents.Single();
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\ProjectInfoTests.cs (16)
38var documentInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "doc"); 74var documentInfo = DocumentInfo.Create(DocumentId.CreateNewId(ProjectId.CreateNewId()), "doc"); 77Assert.Same(documentInfo, ((ImmutableArray<DocumentInfo>)info1.Documents).Single()); 80Assert.True(((ImmutableArray<DocumentInfo>)info2.Documents).IsEmpty); 83Assert.True(((ImmutableArray<DocumentInfo>)info3.Documents).IsEmpty); 86Assert.True(((ImmutableArray<DocumentInfo>)info4.Documents).IsEmpty); 93var documentInfo = DocumentInfo.Create(DocumentId.CreateNewId(ProjectId.CreateNewId()), "doc"); 96Assert.Same(documentInfo, ((ImmutableArray<DocumentInfo>)info1.AdditionalDocuments).Single()); 99Assert.True(((ImmutableArray<DocumentInfo>)info2.AdditionalDocuments).IsEmpty); 102Assert.True(((ImmutableArray<DocumentInfo>)info3.AdditionalDocuments).IsEmpty); 105Assert.True(((ImmutableArray<DocumentInfo>)info4.AdditionalDocuments).IsEmpty); 183var documentInfo = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "doc");
SolutionTests\SolutionTests.cs (51)
1115var newDocumentInfo1 = DocumentInfo.Create( 1124var newDocumentInfo3 = DocumentInfo.Create( 1134var newAddDocumentInfo1 = DocumentInfo.Create( 1143var newAddDocumentInfo3 = DocumentInfo.Create( 1153var newConfigDocumentInfo1 = DocumentInfo.Create( 1162var newConfigDocumentInfo3 = DocumentInfo.Create( 1328var newDocumentInfo1 = DocumentInfo.Create( 1684solution = solution.AddDocument(DocumentInfo.Create(documentAId, "a.cs", loader: textLoaderA, filePath: "a.cs")); 1687solution = solution.AddDocument(DocumentInfo.Create(fileDocumentId, "d.cs", loader: new FileTextLoader(fileD.Path, defaultEncoding: null), filePath: fileD.Path)); 2805var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file1.cs"); 2806var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file2.cs"); 2829var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs"); 2830var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId2), "file2.cs"); 2856var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs"); 2857var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId2), "file2.cs"); 2881var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file1.cs"); 2882var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId), "file2.cs"); 2902var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs"); 2903var documentInfo2 = DocumentInfo.Create(DocumentId.CreateNewId(projectId2), "file2.cs"); 2924var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.cs"); 2943var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), "file1.txt"); 2962var documentInfo1 = DocumentInfo.Create(DocumentId.CreateNewId(projectId1), ".editorconfig"); 4880DocumentInfo.Create( 4913DocumentInfo.Create( 4954DocumentInfo.Create( 5002DocumentInfo.Create( 5048DocumentInfo.Create( 5098.AddDocument(DocumentInfo.Create(documentId, "Test", sourceCodeKind: SourceCodeKind.Script)); 5139.WithAnalyzerConfigDocuments([DocumentInfo.Create(editorConfigDocumentId, ".editorconfig", filePath: editorConfigFilePath)]); 5636var docInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "c.cs", loader: TextLoader.From(TextAndVersion.Create(text, version)));
SolutionTests\SolutionWithSourceGeneratorTests.cs (2)
848var documentInfo = DocumentInfo.Create(
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)));
WorkspaceTests\WorkspaceReferenceTests.cs (10)
35var info = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "code.cs"); 75var info = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "code.cs"); 115var info = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "code.cs"); 155var referenceDocumentInfo = DocumentInfo.Create(DocumentId.CreateNewId(referenceProject.Id), "code.cs"); 159var info = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "code.cs");
WorkspaceTests\WorkspaceTests.cs (2)
167return this.AddDocument(DocumentInfo.Create(id, name, loader: loader)); 173public Document AddDocument(DocumentInfo documentInfo)
Microsoft.VisualStudio.LanguageServices (16)
Implementation\AbstractEditorFactory.cs (1)
335DocumentInfo.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 (9)
727protected override void ApplyDocumentAdded(DocumentInfo info, SourceText text) 730protected override void ApplyAdditionalDocumentAdded(DocumentInfo info, SourceText text) 733protected override void ApplyAnalyzerConfigDocumentAdded(DocumentInfo info, SourceText text) 739private void AddDocumentCore(DocumentInfo info, SourceText initialText, TextDocumentKind documentKind) 880DocumentInfo documentInfo, 993var docInfo = CreateDocumentInfoWithoutText(document); 1236protected override void ApplyDocumentInfoChanged(DocumentId documentId, DocumentInfo updatedInfo) 1293/// The <see cref="VisualStudioWorkspace"/> currently supports only a subset of <see cref="DocumentInfo"/> 1296private static void FailIfDocumentInfoChangesNotSupported(CodeAnalysis.Document document, DocumentInfo updatedInfo)
Venus\ContainedLanguage.cs (1)
115Workspace.OnDocumentAdded(DocumentInfo.Create(
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
PersistentStorage\AbstractPersistentStorageTests.cs (1)
991solution = 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)
334var docInfo = DocumentInfo.Create(
Roslyn.VisualStudio.Next.UnitTests (8)
Remote\SerializationValidator.cs (1)
184var info = await VerifyAssetSerializationAsync<DocumentInfo.DocumentAttributes>(
Remote\SnapshotSerializationTests.cs (1)
64.AddAnalyzerConfigDocuments([DocumentInfo.Create(
Services\SolutionServiceTests.cs (6)
324var additionalDocumentInfo = DocumentInfo.Create( 355var analyzerConfigDocumentInfo = DocumentInfo.Create( 388var documentInfo = DocumentInfo.Create(