13 references to TryReadAll
Microsoft.CodeAnalysis (4)
CvtRes.cs (2)
209
stream.
TryReadAll
(imageResourceSectionBytes, 0, rsrc1.SizeOfRawData); // ConfirmSectionValues ensured that data are available
211
stream.
TryReadAll
(imageResourceSectionBytes, rsrc1.SizeOfRawData, rsrc2.SizeOfRawData); // ConfirmSectionValues ensured that data are available
EncodedStringText.cs (1)
219
var success = stream.
TryReadAll
(buffer, 0, length) == length;
InternalUtilities\StreamExtensions.cs (1)
68
int actualLength =
TryReadAll
(stream, buffer, 0, buffer.Length);
Microsoft.CodeAnalysis.Scripting (2)
Hosting\AssemblyLoader\DesktopAssemblyLoaderImpl.cs (2)
33
peStream.
TryReadAll
(peImage, 0, peImage.Length);
38
pdbStream.
TryReadAll
(pdbImage, 0, pdbImage.Length);
Microsoft.CodeAnalysis.UnitTests (7)
InternalUtilities\StreamExtensionsTests.cs (7)
39
Assert.Equal(sourceArray.Length, stream.
TryReadAll
(destArray, 0, sourceArray.Length));
49
Assert.Throws<IOException>(() => stream.
TryReadAll
(null, 0, 1));
59
Assert.Equal(0, stream.
TryReadAll
(buffer, 0, 1));
60
Assert.Throws<ArgumentException>(() => stream.
TryReadAll
(buffer, 0, 100));
84
Assert.Throws<IOException>(() => stream.
TryReadAll
(destArray, 0, sourceArray.Length));
109
Assert.Throws<IOException>(() => stream.
TryReadAll
(destArray, 0, sourceArray.Length));
121
Assert.Equal(4, stream.
TryReadAll
(destArray, 0, 6));