16 references to FromStream
Microsoft.CodeAnalysis (1)
CommandLine\CommonCompiler.cs (1)
414return EmbeddedText.FromStream(filePath, stream, Arguments.ChecksumAlgorithm);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\CompilationAPITests.cs (2)
461embeddedTexts: new[] { EmbeddedText.FromStream("_", new MemoryStream()) })); 467embeddedTexts: new[] { EmbeddedText.FromStream("_", new MemoryStream()) }));
Microsoft.CodeAnalysis.UnitTests (11)
EmbeddedTextTests.cs (11)
49Assert.Throws<ArgumentNullException>("filePath", () => EmbeddedText.FromStream(null, null)); 50Assert.Throws<ArgumentException>("filePath", () => EmbeddedText.FromStream("", null)); 51Assert.Throws<ArgumentNullException>("stream", () => EmbeddedText.FromStream("path", null)); 52Assert.Throws<ArgumentException>("stream", () => EmbeddedText.FromStream("path", new CannotReadStream())); 53Assert.Throws<ArgumentException>("stream", () => EmbeddedText.FromStream("path", new CannotSeekStream())); 54Assert.Throws<ArgumentException>("checksumAlgorithm", () => EmbeddedText.FromStream("path", new MemoryStream(), SourceHashAlgorithm.None)); 60Assert.Throws<IOException>(() => EmbeddedText.FromStream("path", new HugeStream())); 61Assert.Throws<EndOfStreamException>(() => EmbeddedText.FromStream("path", new TruncatingStream(10))); 62Assert.Throws<EndOfStreamException>(() => EmbeddedText.FromStream("path", new TruncatingStream(1000))); 63Assert.Throws<IOException>(() => EmbeddedText.FromStream("path", new ReadFailsStream())); 91var text = EmbeddedText.FromStream("pathToEmpty", new MemoryStream(new byte[0]), SourceHashAlgorithm.Sha1);
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\CompilationAPITests.vb (2)
467embeddedTexts:={EmbeddedText.FromStream("_", New MemoryStream())})) 473embeddedTexts:={EmbeddedText.FromStream("_", New MemoryStream())}))