7 references to WithTextLoader
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
231var updatedDocuments = temporaryProjectInfo.Documents.Select(d => d.Id == temporaryDocumentId ? d.WithTextLoader(newLoader) : d);
Microsoft.CodeAnalysis.Workspaces (4)
Workspace\Workspace.cs (4)
2070=> CreateDocumentInfoWithoutText(doc).WithTextLoader(TextLoader.From(TextAndVersion.Create(doc.GetTextSynchronously(CancellationToken.None), VersionStamp.Create(), doc.FilePath))); 2237this.OnDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())))); 2281this.OnAdditionalDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())))); 2314this.OnAnalyzerConfigDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create()))));
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildWorkspace.cs (1)
474.WithTextLoader(new WorkspaceFileTextLoader(Services.SolutionServices, fullPath, text.Encoding));
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SolutionTests\DocumentInfoTests.cs (1)
111SolutionTestHelpers.TestProperty(instance, (old, value) => old.WithTextLoader(value), opt => opt.TextLoader, (TextLoader)new TestTextLoader("text"));