10 references to FromBytes
Microsoft.CodeAnalysis (1)
CommandLine\CommonCompiler.cs (1)
410
return EmbeddedText.
FromBytes
(filePath, bytes, Arguments.ChecksumAlgorithm);
Microsoft.CodeAnalysis.UnitTests (9)
EmbeddedTextTests.cs (9)
25
Assert.Throws<ArgumentNullException>("filePath", () => EmbeddedText.
FromBytes
(null, default(ArraySegment<byte>)));
26
Assert.Throws<ArgumentException>("filePath", () => EmbeddedText.
FromBytes
("", default(ArraySegment<byte>)));
27
Assert.Throws<ArgumentNullException>("bytes", () => EmbeddedText.
FromBytes
("path", default(ArraySegment<byte>)));
28
Assert.Throws<ArgumentException>("checksumAlgorithm", () => EmbeddedText.
FromBytes
("path", new ArraySegment<byte>(new byte[0], 0, 0), SourceHashAlgorithm.None));
81
var text = EmbeddedText.
FromBytes
("pathToEmpty", new ArraySegment<byte>(new byte[0], 0, 0), SourceHashAlgorithm.Sha1);
118
var text = EmbeddedText.
FromBytes
("pathToSmall", new ArraySegment<byte>(bytes, 0, bytes.Length));
133
var text = EmbeddedText.
FromBytes
("pathToSmall", new ArraySegment<byte>(paddedBytes, 1, bytes.Length));
160
var text = EmbeddedText.
FromBytes
("pathToLarge", new ArraySegment<byte>(bytes, 0, bytes.Length), SourceHashAlgorithms.Default);
175
var text = EmbeddedText.
FromBytes
("pathToLarge", new ArraySegment<byte>(paddedBytes, 1, bytes.Length), SourceHashAlgorithms.Default);