2 instantiations of TextAndVersion
Microsoft.CodeAnalysis.Workspaces (2)
Workspace\Solution\TextAndVersion.cs (2)
55=> new(text ?? throw new ArgumentNullException(nameof(text)), version, filePath, loadDiagnostic: null); 65=> new(text, version, filePath: null, loadDiagnostic);
217 references to TextAndVersion
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Formatting\RazorLineFormattingOptionsTests.cs (1)
62loader: TextLoader.From(TextAndVersion.Create(sourceText, VersionStamp.Create(), "file.razor.g.cs")),
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SymbolEditorTests.cs (1)
40loader: TextLoader.From(TextAndVersion.Create(SourceText.From(s, encoding: null, SourceHashAlgorithms.Default), VersionStamp.Default)))).ToList();
Microsoft.CodeAnalysis.EditorFeatures (3)
Shared\Preview\PreviewWorkspace.cs (3)
85this.OnDocumentClosed(documentId, TextLoader.From(TextAndVersion.Create(text, version))); 94this.OnAdditionalDocumentClosed(documentId, TextLoader.From(TextAndVersion.Create(text, version))); 103this.OnAnalyzerConfigDocumentClosed(documentId, TextLoader.From(TextAndVersion.Create(text, version)));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
LanguageServer\AbstractLanguageServerProtocolTests.cs (1)
403var loader = TextLoader.From(TextAndVersion.Create(SourceText.From(markup), version, TestSpanMapper.GeneratedFileName));
Rename\RenamerTests.cs (1)
229loader: TextLoader.From(TextAndVersion.Create(startSourceText, VersionStamp.Create(), documentName)),
Workspaces\TestHostDocument.cs (2)
216public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken) 217=> Task.FromResult(TextAndVersion.Create(SourceText.From(_text, encoding: null, options.ChecksumAlgorithm), VersionStamp.Create(), _hostDocument.FilePath));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (7)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (3)
365loader: TextLoader.From(TextAndVersion.Create(SourceText.From(""), VersionStamp.Create(), filePath)), 488loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class A {}"), VersionStamp.Create(), filePath: "test.cs")), 586loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class A {}"), VersionStamp.Create(), filePath: "test.cs")),
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (4)
401loader: TextLoader.From(TextAndVersion.Create(sourceText, VersionStamp.Create(), path)), 409public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken) 756loader: TextLoader.From(TextAndVersion.Create(sourceText, VersionStamp.Create(), "design-time-only.cs")), 3718loader: TextLoader.From(TextAndVersion.Create(sourceText, VersionStamp.Create(), filePath)),
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Diagnostics\DiagnosticServiceTests.vb (1)
55Public Overrides Function LoadTextAndVersionAsync(workspace As Workspace, documentId As DocumentId, cancellationToken As CancellationToken) As Task(Of TextAndVersion)
Microsoft.CodeAnalysis.Features (3)
EditAndContinue\CommittedSolution.cs (1)
276loader: TextLoader.From(TextAndVersion.Create(sourceText, sourceTextVersion, document.Name)),
PdbSourceDocument\PdbSourceDocumentLoaderService.cs (2)
206var textAndVersion = TextAndVersion.Create(sourceText, VersionStamp.Default, filePath);
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Workspaces\LspMiscellaneousFilesWorkspace.cs (2)
112public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken) 113=> Task.FromResult(TextAndVersion.Create(_sourceText, VersionStamp.Create(), _fileUri));
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Diagnostics\PullDiagnosticTests.cs (1)
1214document.Id, TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())));
Microsoft.CodeAnalysis.Remote.Workspaces (1)
AbstractAssetProvider.cs (1)
92var textLoader = TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create(), attributes.FilePath));
Microsoft.CodeAnalysis.Workspaces (121)
Workspace\AdhocWorkspace.cs (4)
131var loader = TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())); 174var loader = TextLoader.From(TextAndVersion.Create(text, version, doc.FilePath)); 202var loader = TextLoader.From(TextAndVersion.Create(text, version, doc.FilePath)); 230var loader = TextLoader.From(TextAndVersion.Create(text, version, doc.FilePath));
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (2)
609public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken) 610=> Task.FromResult(TextAndVersion.Create(_textContainer.CurrentText, VersionStamp.Create(), _filePath));
Workspace\Solution\AdditionalDocumentState.cs (1)
44public new AdditionalDocumentState UpdateText(TextAndVersion newTextAndVersion, PreservationMode mode)
Workspace\Solution\AnalyzerConfigDocumentState.cs (1)
56public new AnalyzerConfigDocumentState UpdateText(TextAndVersion newTextAndVersion, PreservationMode mode)
Workspace\Solution\ConstantTextAndVersionSource.cs (9)
16internal sealed class ConstantTextAndVersionSource : ValueSource<TextAndVersion>, ITextAndVersionSource 18private readonly TextAndVersion _value; 20public ConstantTextAndVersionSource(TextAndVersion value) 28public override TextAndVersion GetValue(CancellationToken cancellationToken) 31public override Task<TextAndVersion> GetValueAsync(CancellationToken cancellationToken) 34public override bool TryGetValue([MaybeNullWhen(false)] out TextAndVersion value) 40public TextAndVersion GetValue(LoadTextOptions options, CancellationToken cancellationToken) 43public Task<TextAndVersion> GetValueAsync(LoadTextOptions options, CancellationToken cancellationToken) 46public bool TryGetValue(LoadTextOptions options, [MaybeNullWhen(false)] out TextAndVersion value)
Workspace\Solution\DocumentState.cs (8)
125var textAndVersion = await newTextSource.GetValueAsync(loadTextOptions, cancellationToken).ConfigureAwait(false); 141var textAndVersion = newTextSource.GetValue(loadTextOptions, cancellationToken); 150TextAndVersion textAndVersion, 187var newTextAndVersion = await newTextSource.GetValueAsync(loadTextOptions, cancellationToken).ConfigureAwait(false); 209var newTextAndVersion = newTextSource.GetValue(loadTextOptions, cancellationToken); 222TextAndVersion newTextAndVersion, 452public new DocumentState UpdateText(TextAndVersion newTextAndVersion, PreservationMode mode) 587if (TextAndVersionSource.TryGetValue(LoadTextOptions, out var textAndVersion))
Workspace\Solution\DocumentState_TreeTextSource.cs (7)
16/// A source for <see cref="TextAndVersion"/> constructed from an syntax tree. 32public async Task<TextAndVersion> GetValueAsync(LoadTextOptions options, CancellationToken cancellationToken) 35return TextAndVersion.Create(text, _version); 38public TextAndVersion GetValue(LoadTextOptions options, CancellationToken cancellationToken) 41return TextAndVersion.Create(text, _version); 44public bool TryGetValue(LoadTextOptions options, [NotNullWhen(true)] out TextAndVersion? value) 48value = TextAndVersion.Create(text, _version);
Workspace\Solution\FileTextLoader.cs (7)
92public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 100public override async Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken) 106TextAndVersion textAndVersion; 182textAndVersion = TextAndVersion.Create(text, version, Path); 204internal override TextAndVersion LoadTextAndVersionSynchronously(LoadTextOptions options, CancellationToken cancellationToken) 210TextAndVersion textAndVersion; 217textAndVersion = TextAndVersion.Create(text, version, Path);
Workspace\Solution\ITextAndVersionSource.cs (3)
19bool TryGetValue(LoadTextOptions options, [MaybeNullWhen(false)] out TextAndVersion value); 20TextAndVersion GetValue(LoadTextOptions options, CancellationToken cancellationToken); 21Task<TextAndVersion> GetValueAsync(LoadTextOptions options, CancellationToken cancellationToken);
Workspace\Solution\LoadableTextAndVersionSource.cs (8)
19public readonly AsyncLazy<TextAndVersion> LazyValue; 24LazyValue = new AsyncLazy<TextAndVersion>(LoadAsync, LoadSynchronously, source.CacheResult); 29private Task<TextAndVersion> LoadAsync(CancellationToken cancellationToken) 32private TextAndVersion LoadSynchronously(CancellationToken cancellationToken) 50private AsyncLazy<TextAndVersion> GetLazyValue(LoadTextOptions options) 63public TextAndVersion GetValue(LoadTextOptions options, CancellationToken cancellationToken) 66public bool TryGetValue(LoadTextOptions options, [MaybeNullWhen(false)] out TextAndVersion value) 69public Task<TextAndVersion> GetValueAsync(LoadTextOptions options, CancellationToken cancellationToken)
Workspace\Solution\RecoverableTextAndVersion.cs (8)
58public bool TryGetValue(LoadTextOptions options, [MaybeNullWhen(false)] out TextAndVersion value) 67value = TextAndVersion.Create(text, recoverableText.Version, recoverableText.LoadDiagnostic); 82if (TryGetValue(options, out var textAndVersion)) 92public TextAndVersion GetValue(LoadTextOptions options, CancellationToken cancellationToken) 117public async Task<TextAndVersion> GetValueAsync(LoadTextOptions options, CancellationToken cancellationToken) 152public RecoverableText(ITextAndVersionSource source, TextAndVersion textAndVersion, LoadTextOptions options, SolutionServices services) 170public TextAndVersion ToTextAndVersion(SourceText text) 171=> TextAndVersion.Create(text, Version, LoadDiagnostic);
Workspace\Solution\Solution.cs (5)
1057loader: TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create(), name)), 1187var loader = TextLoader.From(TextAndVersion.Create(text, version, name)); 1451public Solution WithDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue) 1478public Solution WithAdditionalDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue) 1505public Solution WithAnalyzerConfigDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue)
Workspace\Solution\SolutionState.cs (6)
1304public SolutionState WithDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue) 1307if (oldDocument.TryGetTextAndVersion(out var oldTextAndVersion) && textAndVersion == oldTextAndVersion) 1319public SolutionState WithAdditionalDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue) 1322if (oldDocument.TryGetTextAndVersion(out var oldTextAndVersion) && textAndVersion == oldTextAndVersion) 1334public SolutionState WithAnalyzerConfigDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue) 1337if (oldDocument.TryGetTextAndVersion(out var oldTextAndVersion) && textAndVersion == oldTextAndVersion)
Workspace\Solution\SourceGeneratedDocumentState.cs (2)
24var textAndVersion = TextAndVersion.Create(generatedSourceText, VersionStamp.Create());
Workspace\Solution\TextAndVersion.cs (4)
48/// Create a new <see cref="TextAndVersion"/> instance. 54public static TextAndVersion Create(SourceText text, VersionStamp version, string? filePath = null) 58/// Create a new <see cref="TextAndVersion"/> instance. 64internal static TextAndVersion Create(SourceText text, VersionStamp version, Diagnostic? loadDiagnostic)
Workspace\Solution\TextDocumentState.cs (18)
64: CreateStrongText(TextAndVersion.Create(SourceText.From(string.Empty, encoding: null, loadTextOptions.ChecksumAlgorithm), VersionStamp.Default, info.FilePath)), 74private static ITextAndVersionSource CreateStrongText(TextAndVersion text) 80private static ITextAndVersionSource CreateRecoverableText(TextAndVersion text, LoadTextOptions loadTextOptions, SolutionServices services) 103if (this.TextAndVersionSource.TryGetValue(LoadTextOptions, out var textAndVersion)) 123if (this.TextAndVersionSource.TryGetValue(LoadTextOptions, out var textAndVersion)) 135public bool TryGetTextAndVersion([NotNullWhen(true)] out TextAndVersion? textAndVersion) 154var textAndVersion = this.TextAndVersionSource.GetValue(LoadTextOptions, cancellationToken); 160var textAndVersion = this.TextAndVersionSource.GetValue(LoadTextOptions, cancellationToken); 172var textAndVersion = await GetTextAndVersionAsync(cancellationToken).ConfigureAwait(false); 176public TextDocumentState UpdateText(TextAndVersion newTextAndVersion, PreservationMode mode) 188var newTextAndVersion = TextAndVersion.Create(newText, newVersion, FilePath); 213private ValueTask<TextAndVersion> GetTextAndVersionAsync(CancellationToken cancellationToken) 215if (this.TextAndVersionSource.TryGetValue(LoadTextOptions, out var textAndVersion)) 217return new ValueTask<TextAndVersion>(textAndVersion); 221return new ValueTask<TextAndVersion>(TextAndVersionSource.GetValueAsync(LoadTextOptions, cancellationToken)); 230if (this.TextAndVersionSource.TryGetValue(LoadTextOptions, out var textAndVersion)) 240var textAndVersion = await this.TextAndVersionSource.GetValueAsync(LoadTextOptions, cancellationToken).ConfigureAwait(false);
Workspace\Solution\TextLoader.cs (16)
53public virtual Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken) 58_ => new StrongBox<bool>(new Func<Workspace, DocumentId, CancellationToken, Task<TextAndVersion>>(LoadTextAndVersionAsync).Method.DeclaringType != typeof(TextLoader))).Value) 76public virtual Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 85internal virtual TextAndVersion LoadTextAndVersionSynchronously(LoadTextOptions options, CancellationToken cancellationToken) 91internal async Task<TextAndVersion> LoadTextAsync(LoadTextOptions options, CancellationToken cancellationToken) 120internal TextAndVersion LoadTextSynchronously(LoadTextOptions options, CancellationToken cancellationToken) 151private TextAndVersion CreateFailedText(string message) 169return TextAndVersion.Create( 178public static TextLoader From(TextAndVersion textAndVersion) 206private readonly TextAndVersion _textAndVersion; 208internal TextDocumentLoader(TextAndVersion textAndVersion) 211public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken) 214internal override TextAndVersion LoadTextAndVersionSynchronously(LoadTextOptions options, CancellationToken cancellationToken) 234public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken) 237internal override TextAndVersion LoadTextAndVersionSynchronously(LoadTextOptions options, CancellationToken cancellationToken) 238=> TextAndVersion.Create(_container.CurrentText, _version, _filePath);
Workspace\Workspace.cs (5)
1771=> CreateDocumentInfoWithoutText(doc).WithTextLoader(TextLoader.From(TextAndVersion.Create(doc.GetTextSynchronously(CancellationToken.None), VersionStamp.Create(), doc.FilePath))); 1938this.OnDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())))); 1982this.OnAdditionalDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())))); 2015this.OnAnalyzerConfigDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())))); 2037this.OnAnalyzerConfigDocumentTextLoaderChanged(id, TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())));
Workspace\Workspace_Editor.cs (7)
377var newTextAndVersion = GetProperTextAndVersion(oldText, newText, version, oldDocumentState.FilePath); 462private static TextAndVersion GetProperTextAndVersion(SourceText oldText, SourceText newText, VersionStamp version, string? filePath) 467? TextAndVersion.Create(newText, version, filePath) 468: TextAndVersion.Create(newText, version.GetNewerVersion(), filePath); 524Func<Solution, DocumentId, TextAndVersion, PreservationMode, Solution> withDocumentTextAndVersion, 547var newTextAndVersion = TextAndVersion.Create(newText, version, oldDocument.FilePath);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
VisualStudioMSBuildWorkspaceTests.cs (2)
2360var tav = doc.TextLoader.LoadTextAndVersionSynchronously(new LoadTextOptions(SourceHashAlgorithms.Default), CancellationToken.None); 2363var atav = adoc.TextLoader.LoadTextAndVersionSynchronously(new LoadTextOptions(SourceHashAlgorithms.Default), CancellationToken.None);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
TestTextLoader.cs (3)
16private readonly TextAndVersion _textAndVersion; 20_textAndVersion = TextAndVersion.Create(SourceText.From(text, encoding: null, checksumAlgorithm), VersionStamp.Create()); 23public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Workspaces.UnitTests (58)
SolutionTests\SolutionTests.cs (26)
350var textAndVersion = TextAndVersion.Create(SourceText.From("new text"), VersionStamp.Default); 428var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 472private static Solution UpdateSolution(PreservationMode mode, TextUpdateType updateType, Solution solution, DocumentId documentId1, SourceText text, TextAndVersion textAndVersion) 516var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 599var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 682var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 758var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 830var textAndVersion = TextAndVersion.Create(SourceText.From("new text"), VersionStamp.Default); 876var textAndVersion = TextAndVersion.Create(SourceText.From("new text"), VersionStamp.Default); 3763var unused = await loader.LoadTextAndVersionAsync(new LoadTextOptions(SourceHashAlgorithms.Default), CancellationToken.None); 3777var unused = loader.LoadTextAndVersionSynchronously(new LoadTextOptions(SourceHashAlgorithms.Default), CancellationToken.None); 3935loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default))))); 3969loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default))))); 4011loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default))))); 4023TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA6789.severity = error"), VersionStamp.Default)), 4059loader: TextLoader.From(TextAndVersion.Create(SourceText.From("is_global = true\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default))))); 4105loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ngenerated_code = true"), VersionStamp.Default))))); 4294var docInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "c.cs", loader: TextLoader.From(TextAndVersion.Create(text, version)));
SolutionTests\TextLoaderTests.cs (26)
22public new virtual Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 23=> Task.FromResult((TextAndVersion?)null!); 29public new virtual Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 30=> Task.FromResult((TextAndVersion?)null!); 33public virtual Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId) 34=> Task.FromResult((TextAndVersion?)null!); 37public virtual Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, ref DocumentId? documentId, CancellationToken cancellationToken) 38=> Task.FromResult((TextAndVersion?)null!); 41public virtual Task<TextAndVersion> LoadTextAndVersionAsync<T>(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 42=> Task.FromResult((TextAndVersion?)null!); 47public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 48=> Task.FromResult((TextAndVersion?)null!); 53public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId) 59public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, ref DocumentId? documentId, CancellationToken cancellationToken) 60=> Task.FromResult((TextAndVersion?)null!); 65public override Task<TextAndVersion> LoadTextAndVersionAsync<T>(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 66=> Task.FromResult((TextAndVersion?)null!); 82public static readonly TextAndVersion Value = TextAndVersion.Create(SourceText.From(""), VersionStamp.Default); 85public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 91public static new readonly TextAndVersion Value = TextAndVersion.Create(SourceText.From(""), VersionStamp.Default); 94public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 100public static readonly TextAndVersion Value = TextAndVersion.Create(SourceText.From(""), VersionStamp.Default); 102public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
WorkspaceTests\AdhocWorkspaceTests.cs (5)
158loader: TextLoader.From(TextAndVersion.Create(SourceText.From(""), VersionStamp.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))); 290loader: TextLoader.From(TextAndVersion.Create(text, version, analyzerConfigDocFilePath)), 346var docInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "c.cs", loader: TextLoader.From(TextAndVersion.Create(text, version)));
WorkspaceTests\WorkspaceTests.cs (1)
168var loader = TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create()));
Microsoft.VisualStudio.LanguageServices (3)
Preview\PreviewUpdater.PreviewDialogWorkspace.cs (3)
53public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken) 56internal override TextAndVersion LoadTextAndVersionSynchronously(LoadTextOptions options, CancellationToken cancellationToken) 57=> TextAndVersion.Create(_text, VersionStamp.Create());
Microsoft.VisualStudio.LanguageServices.LiveShare (2)
Client\Projects\WorkspaceFileTextLoaderNoException.cs (2)
28public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken) 32return Task.FromResult(TextAndVersion.Create(SourceText.From("", encoding: null, options.ChecksumAlgorithm), VersionStamp.Create()));
Roslyn.VisualStudio.Next.UnitTests (4)
Remote\SnapshotSerializationTests.cs (1)
78loader: TextLoader.From(TextAndVersion.Create(SourceText.From("root = true"), VersionStamp.Create())))));
Services\SolutionServiceTests.cs (3)
247loader: TextLoader.From(TextAndVersion.Create(SourceText.From("test"), VersionStamp.Create()))); 279loader: TextLoader.From(TextAndVersion.Create(SourceText.From("root = true"), VersionStamp.Create(), filePath: configPath)), 311loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class A { }"), VersionStamp.Create())));