27 references to FromSource
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
146embeddedTexts.Add(EmbeddedText.FromSource(syntaxTree.FilePath, sourceText));
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
146embeddedTexts.Add(EmbeddedText.FromSource(syntaxTree.FilePath, sourceText));
Microsoft.CodeAnalysis (4)
CommandLine\CommonCompiler.cs (2)
464text = EmbeddedText.FromSource(path, tree.GetText()); 1167embeddedTextBuilder.Add(EmbeddedText.FromSource(tree.FilePath, sourceText));
Text\SourceText.cs (2)
170/// <param name="canBeEmbedded">True if the text can be passed to <see cref="EmbeddedText.FromSource"/> and be embedded in a PDB.</param> 243/// <param name="canBeEmbedded">True if the text can be passed to <see cref="EmbeddedText.FromSource"/> and be embedded in a PDB.</param>
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
290embeddedTexts = sources.Select((s, i) => EmbeddedText.FromSource(sourceCodePaths[i], s)).ToArray();
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
PDB\PDBEmbeddedSourceTests.cs (3)
47EmbeddedText.FromSource(tree1.FilePath, tree1.GetText()), 48EmbeddedText.FromSource(tree2.FilePath, tree2.GetText()) 109embeddedTexts: new[] { EmbeddedText.FromSource(tree.FilePath, tree.GetText()) });
Microsoft.CodeAnalysis.Rebuild (1)
CompilationFactory.cs (1)
87.Select(pair => EmbeddedText.FromSource(pair.path, pair.text))
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\IRuntimeEnvironment.cs (1)
254.Select(t => EmbeddedText.FromSource(t.filePath, t.text))
Microsoft.CodeAnalysis.UnitTests (15)
EmbeddedTextTests.cs (15)
34Assert.Throws<ArgumentNullException>("filePath", () => EmbeddedText.FromSource(null, null)); 35Assert.Throws<ArgumentException>("filePath", () => EmbeddedText.FromSource("", null)); 36Assert.Throws<ArgumentNullException>("text", () => EmbeddedText.FromSource("path", null)); 39Assert.Throws<ArgumentException>("text", () => EmbeddedText.FromSource("path", SourceText.From("source"))); 42Assert.Throws<ArgumentException>("text", () => EmbeddedText.FromSource("path", SourceText.From(new byte[0], 0, Encoding.UTF8, canBeEmbedded: false))); 43Assert.Throws<ArgumentException>("text", () => EmbeddedText.FromSource("path", SourceText.From(new MemoryStream(new byte[0]), Encoding.UTF8, canBeEmbedded: false))); 104var text = EmbeddedText.FromSource("pathToEmpty", source); 146var text = EmbeddedText.FromSource("pathToSmall", source); 188var text = EmbeddedText.FromSource("pathToLarge", source); 201var expectedEmbedded = EmbeddedText.FromSource("pathToSmall", expected); 204var actualEmbedded = EmbeddedText.FromSource(expectedEmbedded.FilePath, actual); 216var expectedEmbedded = EmbeddedText.FromSource("pathToSmall", expected); 219var actualEmbedded = EmbeddedText.FromSource(expectedEmbedded.FilePath, actual); 239var text = EmbeddedText.FromSource("pathToPrecomputed", source); 253var text = EmbeddedText.FromSource("pathToLarge", source);