5 types derived from TextLoader
Microsoft.CodeAnalysis.Workspaces (5)
Serialization\SerializableSourceText.cs (1)
210
private sealed class SerializableSourceTextLoader :
TextLoader
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
656
private sealed class SourceTextLoader :
TextLoader
Workspace\Solution\FileTextLoader.cs (1)
19
public class FileTextLoader :
TextLoader
Workspace\Solution\TextLoader.cs (2)
196
private sealed class TextDocumentLoader :
TextLoader
210
private sealed class TextContainerLoader :
TextLoader
76 references to TextLoader
Microsoft.CodeAnalysis.Features (7)
EditAndContinue\CommittedSolution.cs (1)
291
loader:
TextLoader
.From(TextAndVersion.Create(sourceText, sourceTextVersion, document.Name)),
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (2)
358
loader:
TextLoader
.From(assemblyInfoSourceText.Container, VersionStamp.Default),
369
loader:
TextLoader
.From(emptySourceText.Container, VersionStamp.Default),
PdbSourceDocument\IPdbSourceDocumentLoaderService.cs (1)
23
internal sealed record SourceFileInfo(string FilePath, string SourceDescription,
TextLoader
Loader, SourceHashAlgorithm ChecksumAlgorithm, bool FromRemoteLocation);
PdbSourceDocument\PdbSourceDocumentLoaderService.cs (2)
197
var
textLoader =
TextLoader
.From(textAndVersion);
Workspace\MiscellaneousFileUtilities.cs (1)
28
TextLoader
textLoader,
Microsoft.CodeAnalysis.Workspaces (69)
Serialization\SerializableSourceText.cs (2)
198
public
TextLoader
ToTextLoader(string? filePath)
202
/// A <see cref="
TextLoader
"/> that wraps a <see cref="SerializableSourceText"/> and provides access to the text in
Workspace\AdhocWorkspace.cs (8)
126
var
loader =
TextLoader
.From(TextAndVersion.Create(text, VersionStamp.Create()));
169
var
loader =
TextLoader
.From(TextAndVersion.Create(text, version, doc.FilePath));
197
var
loader =
TextLoader
.From(TextAndVersion.Create(text, version, doc.FilePath));
225
var
loader =
TextLoader
.From(TextAndVersion.Create(text, version, doc.FilePath));
Workspace\Host\SourceFiles\DynamicFileInfo.cs (2)
13
internal sealed class DynamicFileInfo(string filePath, SourceCodeKind sourceCodeKind,
TextLoader
textLoader, bool designTimeOnly, IDocumentServiceProvider? documentServiceProvider)
29
public
TextLoader
TextLoader { get; } = textLoader;
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (3)
69
private readonly Func<Solution, DocumentId,
TextLoader
, Solution> _documentTextLoaderChangedAction;
88
Func<Solution, DocumentId,
TextLoader
, Solution> documentTextLoaderChangedAction,
407
var documentsToChange = ArrayBuilder<(DocumentId,
TextLoader
)>.GetInstance(filePaths.Count);
Workspace\Solution\AdditionalDocumentState.cs (1)
50
public new AdditionalDocumentState UpdateText(
TextLoader
loader, PreservationMode mode)
Workspace\Solution\AnalyzerConfigDocumentState.cs (1)
60
public new AnalyzerConfigDocumentState UpdateText(
TextLoader
loader, PreservationMode mode)
Workspace\Solution\ConstantTextAndVersionSource.cs (1)
24
public
TextLoader
? TextLoader
Workspace\Solution\DocumentInfo.cs (6)
56
public
TextLoader
? TextLoader { get; }
66
internal DocumentInfo(DocumentAttributes attributes,
TextLoader
? loader, IDocumentServiceProvider? documentServiceProvider)
81
TextLoader
? loader = null,
100
Optional<
TextLoader
?> loader = default,
104
var
newLoader = loader.HasValue ? loader.Value : TextLoader;
132
public DocumentInfo WithTextLoader(
TextLoader
? loader)
Workspace\Solution\DocumentState.cs (1)
450
public new DocumentState UpdateText(
TextLoader
loader, PreservationMode mode)
Workspace\Solution\DocumentState_TreeTextSource.cs (1)
26
public
TextLoader
? TextLoader
Workspace\Solution\Solution.cs (7)
1040
loader:
TextLoader
.From(TextAndVersion.Create(text, VersionStamp.Create(), name)),
1048
public Solution AddDocument(DocumentId documentId, string name,
TextLoader
loader, IEnumerable<string>? folders = null)
1154
var
loader =
TextLoader
.From(TextAndVersion.Create(text, version, name));
1473
public Solution WithDocumentTextLoader(DocumentId documentId,
TextLoader
loader, PreservationMode mode)
1494
public Solution WithAdditionalDocumentTextLoader(DocumentId documentId,
TextLoader
loader, PreservationMode mode)
1515
public Solution WithAnalyzerConfigDocumentTextLoader(DocumentId documentId,
TextLoader
loader, PreservationMode mode)
Workspace\Solution\SolutionCompilationState.cs (3)
1069
DocumentId documentId,
TextLoader
loader, PreservationMode mode)
1084
DocumentId documentId,
TextLoader
loader, PreservationMode mode)
1099
DocumentId documentId,
TextLoader
loader, PreservationMode mode)
Workspace\Solution\SolutionState.cs (3)
1111
public StateChange UpdateDocumentTextLoader(DocumentId documentId,
TextLoader
loader, PreservationMode mode)
1124
public StateChange UpdateAdditionalDocumentTextLoader(DocumentId documentId,
TextLoader
loader, PreservationMode mode)
1137
public StateChange UpdateAnalyzerConfigDocumentTextLoader(DocumentId documentId,
TextLoader
loader, PreservationMode mode)
Workspace\Solution\TextDocumentState.cs (4)
64
public TextDocumentState WithTextLoader(
TextLoader
? loader, PreservationMode mode)
148
public TextDocumentState UpdateText(
TextLoader
? loader, PreservationMode mode)
156
protected static ITextAndVersionSource CreateTextAndVersionSource(SolutionServices solutionServices,
TextLoader
? loader, string? filePath, LoadTextOptions loadTextOptions, PreservationMode mode = PreservationMode.PreserveValue)
161
private static ITextAndVersionSource CreateTextFromLoader(SolutionServices solutionServices,
TextLoader
loader, PreservationMode mode)
Workspace\Solution\TextLoader.cs (5)
65
_ => new StrongBox<bool>(new Func<Workspace, DocumentId, CancellationToken, Task<TextAndVersion>>(LoadTextAndVersionAsync).Method.DeclaringType != typeof(
TextLoader
))).Value)
168
/// Creates a new <see cref="
TextLoader
"/> from an already existing source text and version.
170
public static
TextLoader
From(TextAndVersion textAndVersion)
181
/// Creates a <see cref="
TextLoader
"/> from a <see cref="SourceTextContainer"/> and version.
186
public static
TextLoader
From(SourceTextContainer container, VersionStamp version, string? filePath = null)
Workspace\Solution\VersionSource\ITextAndVersionSource.cs (1)
23
TextLoader
? TextLoader { get; }
Workspace\Solution\VersionSource\LoadableTextAndVersionSource.cs (2)
13
internal sealed class LoadableTextAndVersionSource(
TextLoader
loader, bool cacheResult) : ITextAndVersionSource
105
public
TextLoader
TextLoader { get; } = loader;
Workspace\Solution\VersionSource\RecoverableTextAndVersion.cs (1)
48
public
TextLoader
? TextLoader
Workspace\Workspace.cs (9)
1186
protected internal void OnDocumentTextLoaderChanged(DocumentId documentId,
TextLoader
loader)
1192
private protected void OnDocumentTextLoaderChanged(DocumentId documentId,
TextLoader
loader, bool requireDocumentPresent)
1207
protected internal void OnAdditionalDocumentTextLoaderChanged(DocumentId documentId,
TextLoader
loader)
1222
protected internal void OnAnalyzerConfigDocumentTextLoaderChanged(DocumentId documentId,
TextLoader
loader)
2038
=> CreateDocumentInfoWithoutText(doc).WithTextLoader(
TextLoader
.From(TextAndVersion.Create(doc.GetTextSynchronously(CancellationToken.None), VersionStamp.Create(), doc.FilePath)));
2205
this.OnDocumentAdded(info.WithTextLoader(
TextLoader
.From(TextAndVersion.Create(text, VersionStamp.Create()))));
2249
this.OnAdditionalDocumentAdded(info.WithTextLoader(
TextLoader
.From(TextAndVersion.Create(text, VersionStamp.Create()))));
2282
this.OnAnalyzerConfigDocumentAdded(info.WithTextLoader(
TextLoader
.From(TextAndVersion.Create(text, VersionStamp.Create()))));
2304
this.OnAnalyzerConfigDocumentTextLoaderChanged(id,
TextLoader
.From(TextAndVersion.Create(text, VersionStamp.Create())));
Workspace\Workspace_Editor.cs (8)
637
protected internal void OnDocumentClosed(DocumentId documentId,
TextLoader
reloader, bool updateActiveContext = false)
643
private protected void OnDocumentClosedEx(DocumentId documentId,
TextLoader
reloader, bool requireDocumentPresentAndOpen)
713
protected internal void OnAdditionalDocumentClosed(DocumentId documentId,
TextLoader
reloader)
716
private protected void OnAdditionalDocumentClosed(DocumentId documentId,
TextLoader
reloader, bool requireDocumentPresentAndOpen)
727
protected internal void OnAnalyzerConfigDocumentClosed(DocumentId documentId,
TextLoader
reloader)
730
private protected void OnAnalyzerConfigDocumentClosed(DocumentId documentId,
TextLoader
reloader, bool requireDocumentPresentAndOpen)
746
TextLoader
reloader,
750
Func<Solution, DocumentId,
TextLoader
, PreservationMode, Solution> withTextDocumentTextLoader)