67 references to Create
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.Test.Utilities (1)
Rename\RenamerTests.cs (1)
229loader: TextLoader.From(TextAndVersion.Create(startSourceText, VersionStamp.Create(), documentName)),
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (2)
312loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class A {}"), VersionStamp.Create(), filePath: "test.cs")), 391loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class A {}"), VersionStamp.Create(), filePath: "test.cs")),
Microsoft.CodeAnalysis.Features (1)
PdbSourceDocument\PdbSourceDocumentLoaderService.cs (1)
200var textAndVersion = TextAndVersion.Create(sourceText, VersionStamp.Default, filePath);
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
352loader: TextLoader.From(TextAndVersion.Create(sourceText, VersionStamp.Create(), path)),
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
349loader: TextLoader.From(TextAndVersion.Create(sourceText, VersionStamp.Create(), "design-time-only.cs")),
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Workspaces\SourceTextLoader.cs (1)
27=> Task.FromResult(TextAndVersion.Create(_sourceText, VersionStamp.Create(), _fileUri));
Microsoft.CodeAnalysis.Workspaces (20)
Serialization\SerializableSourceText.cs (2)
237=> TextAndVersion.Create(await this.SerializableSourceText.GetTextAsync(cancellationToken).ConfigureAwait(false), _version); 240=> TextAndVersion.Create(this.SerializableSourceText.GetText(cancellationToken), _version);
Workspace\AdhocWorkspace.cs (1)
126var loader = TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create()));
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
644=> Task.FromResult(TextAndVersion.Create(_textContainer.CurrentText, VersionStamp.Create(), _filePath));
Workspace\Solution\FileTextLoader.cs (2)
184return TextAndVersion.Create(text, version, t.self.Path); 208return TextAndVersion.Create(text, version, t.self.Path);
Workspace\Solution\Solution.cs (2)
990loader: TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create(), name)), 1104var loader = TextLoader.From(TextAndVersion.Create(text, version, name));
Workspace\Solution\SourceGeneratedDocumentState.cs (1)
70var textAndVersion = TextAndVersion.Create(generatedSourceText, VersionStamp.Create());
Workspace\Solution\TextDocumentState.cs (2)
148var newTextAndVersion = TextAndVersion.Create(newText, newVersion, FilePath); 164: CreateStrongText(TextAndVersion.Create(SourceText.From(string.Empty, encoding: null, loadTextOptions.ChecksumAlgorithm), VersionStamp.Default, filePath));
Workspace\Solution\TextLoader.cs (1)
245=> TextAndVersion.Create(_container.CurrentText, _version, _filePath);
Workspace\Workspace.cs (5)
2011=> CreateDocumentInfoWithoutText(doc).WithTextLoader(TextLoader.From(TextAndVersion.Create(doc.GetTextSynchronously(CancellationToken.None), VersionStamp.Create(), doc.FilePath))); 2178this.OnDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())))); 2222this.OnAdditionalDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())))); 2255this.OnAnalyzerConfigDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())))); 2277this.OnAnalyzerConfigDocumentTextLoaderChanged(id, TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())));
Workspace\Workspace_Editor.cs (3)
490? TextAndVersion.Create(newText, version, filePath) 491: TextAndVersion.Create(newText, version.GetNewerVersion(), filePath); 596var newTextAndVersion = TextAndVersion.Create(newText, version, oldDocument.FilePath);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
TestTextLoader.cs (1)
20_textAndVersion = TextAndVersion.Create(SourceText.From(text, encoding: null, checksumAlgorithm), VersionStamp.Create());
Workspaces\TestHostDocument.cs (1)
189=> Task.FromResult(TextAndVersion.Create(SourceText.From(_text, encoding: null, options.ChecksumAlgorithm), VersionStamp.Create(), _hostDocument.FilePath));
Microsoft.CodeAnalysis.Workspaces.UnitTests (30)
SolutionTests\SolutionTests.cs (22)
374var textAndVersion = TextAndVersion.Create(SourceText.From("new text"), VersionStamp.Default); 452var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 540var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 623var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 706var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 782var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 869var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 942var textAndVersion = TextAndVersion.Create(SourceText.From("new text"), VersionStamp.Default); 988var textAndVersion = TextAndVersion.Create(SourceText.From("new text"), VersionStamp.Default); 1108loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class NewD1;", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))), 1117loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class NewD3;", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))), 1127loader: TextLoader.From(TextAndVersion.Create(SourceText.From("new text1", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))), 1136loader: TextLoader.From(TextAndVersion.Create(SourceText.From("new text3", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))), 1146loader: TextLoader.From(TextAndVersion.Create(SourceText.From("#new empty1", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))), 1155loader: TextLoader.From(TextAndVersion.Create(SourceText.From("#new empty3", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))), 4688loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default))))); 4721loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default))))); 4762loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default))))); 4774TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA6789.severity = error"), VersionStamp.Default)), 4810loader: TextLoader.From(TextAndVersion.Create(SourceText.From("is_global = true\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default))))); 4856loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ngenerated_code = true"), VersionStamp.Default))))); 5423var docInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "c.cs", loader: TextLoader.From(TextAndVersion.Create(text, version)));
SolutionTests\TextLoaderTests.cs (3)
82public static readonly TextAndVersion Value = TextAndVersion.Create(SourceText.From(""), VersionStamp.Default); 91public static new readonly TextAndVersion Value = TextAndVersion.Create(SourceText.From(""), VersionStamp.Default); 100public static readonly TextAndVersion Value = TextAndVersion.Create(SourceText.From(""), VersionStamp.Default);
WorkspaceTests\AdhocWorkspaceTests.cs (4)
155loader: TextLoader.From(TextAndVersion.Create(SourceText.From(""), VersionStamp.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))); 322var docInfo = DocumentInfo.Create(DocumentId.CreateNewId(pid), "c.cs", loader: TextLoader.From(TextAndVersion.Create(text, version)));
WorkspaceTests\WorkspaceTests.cs (1)
165var loader = TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create()));
Microsoft.VisualStudio.LanguageServices (1)
Preview\PreviewUpdater.PreviewDialogWorkspace.cs (1)
57=> TextAndVersion.Create(_text, VersionStamp.Create());
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Client\Projects\WorkspaceFileTextLoaderNoException.cs (1)
32return Task.FromResult(TextAndVersion.Create(SourceText.From("", encoding: null, options.ChecksumAlgorithm), VersionStamp.Create()));
Roslyn.VisualStudio.Next.UnitTests (4)
Remote\SnapshotSerializationTests.cs (1)
67loader: TextLoader.From(TextAndVersion.Create(SourceText.From("root = true"), VersionStamp.Create())))]);
Services\SolutionServiceTests.cs (3)
335loader: TextLoader.From(TextAndVersion.Create(SourceText.From("test"), VersionStamp.Create()))); 367loader: TextLoader.From(TextAndVersion.Create(SourceText.From("root = true"), VersionStamp.Create(), filePath: configPath)), 399loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class A { }"), VersionStamp.Create())));