42 instantiations of EndOfStreamException
csc (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
621throw new EndOfStreamException("Reached end of stream before end of read.");
Microsoft.AspNetCore.Components.Server (7)
Circuits\RemoteJSDataStream.cs (4)
99throw new EndOfStreamException($"Out of sequence chunk received, expected {_expectedChunkId}, but received {chunkId}."); 106throw new EndOfStreamException("The incoming data chunk cannot be empty."); 111throw new EndOfStreamException("The incoming data chunk exceeded the permitted length."); 118throw new EndOfStreamException($"The incoming data stream declared a length {_totalLength}, but {_bytesRead} bytes were sent.");
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\MessagePackReader.cs (3)
927private static EndOfStreamException ThrowNotEnoughBytesException() => throw new EndOfStreamException(); 933private static EndOfStreamException ThrowNotEnoughBytesException(Exception innerException) => throw new EndOfStreamException(new EndOfStreamException().Message, innerException);
Microsoft.AspNetCore.Components.WebAssembly (1)
src\Components\Shared\src\PullFromJSDataStream.cs (1)
103throw new EndOfStreamException("Failed to read the requested number of bytes from the stream.");
Microsoft.AspNetCore.Components.WebView (1)
src\Components\Shared\src\PullFromJSDataStream.cs (1)
103throw new EndOfStreamException("Failed to read the requested number of bytes from the stream.");
Microsoft.AspNetCore.OutputCaching (1)
FormatterBinaryReader.cs (1)
193private static void ThrowEndOfStream() => throw new EndOfStreamException();
Microsoft.AspNetCore.Session (1)
DistributedSession.cs (1)
417throw new EndOfStreamException();
Microsoft.AspNetCore.SpaServices.Extensions (1)
Util\EventedStreamReader.cs (1)
65ResolveIfStillPending(() => tcs.SetException(new EndOfStreamException()));
Microsoft.Build (2)
FileUtilities.cs (1)
1598throw new EndOfStreamException();
InterningBinaryReader.cs (1)
147throw new EndOfStreamException();
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
621throw new EndOfStreamException("Reached end of stream before end of read.");
Microsoft.Build.Tasks.Core (1)
InterningBinaryReader.cs (1)
147throw new EndOfStreamException();
Microsoft.Build.Utilities.Core (1)
FileUtilities.cs (1)
1598throw new EndOfStreamException();
Microsoft.CodeAnalysis (3)
EmbeddedText.cs (2)
237throw new EndOfStreamException(); 255throw new EndOfStreamException();
PEWriter\ManagedResource.cs (1)
60throw new EndOfStreamException(
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Storage\DiskBasedResponseCache.cs (1)
149throw new EndOfStreamException(
Microsoft.ML.Data (2)
DataLoadSave\Text\TextLoaderCursor.cs (1)
533throw new EndOfStreamException($"A quoted field opened on line {lineNum} was never closed, and we've read to the last line in the file without finding the closing quote");
Utilities\StreamUtils.cs (1)
225throw new EndOfStreamException("Unable to read beyond the end of the stream.");
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (1)
257Return New IO.EndOfStreamException(Description)
MSBuild (1)
InterningBinaryReader.cs (1)
147throw new EndOfStreamException();
MSBuildTaskHost (2)
FileUtilities.cs (1)
1598throw new EndOfStreamException();
InterningBinaryReader.cs (1)
147throw new EndOfStreamException();
PresentationCore (1)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Ink\BitStream.cs (1)
230throw new System.IO.EndOfStreamException(SR.EndOfStreamReached);
Replay (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
621throw new EndOfStreamException("Reached end of stream before end of read.");
System.Formats.Nrbf (1)
System\Formats\Nrbf\Utils\ThrowHelper.cs (1)
38=> throw new EndOfStreamException();
System.Formats.Tar (1)
System\Formats\Tar\SubReadStream.cs (1)
95throw new EndOfStreamException();
System.IO.Packaging (1)
System\IO\Packaging\InterleavedZipPackagePartStream.cs (1)
568throw new EndOfStreamException();
System.IO.Pipes (1)
System\IO\Error.cs (1)
11return new EndOfStreamException(SR.IO_EOF_ReadBeyondEOF);
System.IO.Ports (1)
System\IO\Ports\InternalResources.cs (1)
14throw new EndOfStreamException(SR.IO_EOF_ReadBeyondEOF);
System.Net.Security (1)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (1)
885result == 0 ? new EndOfStreamException() : // end of file that violates protocol
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (1)
434throw new EndOfStreamException(SR.Format(SR.BadImageFormat_ResourceNameCorrupted_NameIndex, index));
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (1)
393new EndOfStreamException(SR.IO_EOF_ReadBeyondEOF);
System.Resources.Extensions (1)
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (1)
434throw new EndOfStreamException(SR.Format(SR.BadImageFormat_ResourceNameCorrupted_NameIndex, index));
System.Security.Cryptography (1)
System\Security\Cryptography\CapiHelper.Shared.cs (1)
204throw new EndOfStreamException(); // Simulate same exception as ReadKeyBlobHeader would throw
vbc (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
621throw new EndOfStreamException("Reached end of stream before end of read.");
VBCSCompiler (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
621throw new EndOfStreamException("Reached end of stream before end of read.");
66 references to EndOfStreamException
Aspire.Hosting (1)
Dcp\DcpPipelineBuilder.cs (1)
68ShouldHandle = new PredicateBuilder().HandleInner<EndOfStreamException>(),
Microsoft.AspNetCore.Components.Server (12)
Circuits\RemoteJSDataStream.cs (1)
140if (e is EndOfStreamException)
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\MessagePackReader.cs (11)
21/// <exception cref="EndOfStreamException">Thrown by reading methods when there are not enough bytes to read the required value.</exception> 89/// <exception cref="EndOfStreamException">Thrown if the end of the sequence provided to the constructor is reached before the expected end of the data.</exception> 100/// <exception cref="EndOfStreamException">Thrown if the end of the sequence provided to the constructor is reached before the expected end of the data.</exception> 250/// <exception cref="EndOfStreamException">Thrown if the end of the sequence provided to the constructor is reached before the expected end of the data.</exception> 302/// <exception cref="EndOfStreamException"> 380/// <exception cref="EndOfStreamException"> 796/// <exception cref="EndOfStreamException"> 927private static EndOfStreamException ThrowNotEnoughBytesException() => throw new EndOfStreamException(); 933private static EndOfStreamException ThrowNotEnoughBytesException(Exception innerException) => throw new EndOfStreamException(new EndOfStreamException().Message, innerException); 946/// Throws <see cref="EndOfStreamException"/> if a condition is false. 949/// <exception cref="EndOfStreamException">Thrown if <paramref name="condition"/> is <c>false</c>.</exception>
Microsoft.AspNetCore.Components.Server.Tests (8)
Circuits\RemoteJSDataStreamTest.cs (8)
128var ex = await Assert.ThrowsAsync<EndOfStreamException>(async () => await RemoteJSDataStream.ReceiveData(jsRuntime, streamId, chunkId: 0, chunk, error: null).DefaultTimeout()); 133ex = await Assert.ThrowsAsync<EndOfStreamException>(async () => await remoteJSDataStream.CopyToAsync(mem).DefaultTimeout()); 147var ex = await Assert.ThrowsAsync<EndOfStreamException>(async () => await RemoteJSDataStream.ReceiveData(jsRuntime, streamId, chunkId: 0, chunk, error: null).DefaultTimeout()); 152ex = await Assert.ThrowsAsync<EndOfStreamException>(async () => await remoteJSDataStream.CopyToAsync(mem).DefaultTimeout()); 167var ex = await Assert.ThrowsAsync<EndOfStreamException>(async () => await RemoteJSDataStream.ReceiveData(jsRuntime, streamId, chunkId: 0, chunk, error: null).DefaultTimeout()); 172ex = await Assert.ThrowsAsync<EndOfStreamException>(async () => await remoteJSDataStream.CopyToAsync(mem).DefaultTimeout()); 191var ex = await Assert.ThrowsAsync<EndOfStreamException>(async () => await RemoteJSDataStream.ReceiveData(jsRuntime, streamId, chunkId: 7, chunk, error: null).DefaultTimeout()); 196ex = await Assert.ThrowsAsync<EndOfStreamException>(async () => await remoteJSDataStream.CopyToAsync(mem).DefaultTimeout());
Microsoft.AspNetCore.Components.WebAssembly.Tests (6)
PullFromJSDataStreamTest.cs (6)
72var ex = await Assert.ThrowsAsync<EndOfStreamException>(async () => await pullFromJSDataStream.CopyToAsync(mem).DefaultTimeout()); 86var ex = await Assert.ThrowsAsync<EndOfStreamException>(async () => await pullFromJSDataStream.CopyToAsync(mem).DefaultTimeout()); 100var ex = await Assert.ThrowsAsync<EndOfStreamException>(async () => await pullFromJSDataStream.CopyToAsync(mem).DefaultTimeout());
Microsoft.AspNetCore.SpaServices.Extensions (3)
AngularCli\AngularCliBuilder.cs (1)
72catch (EndOfStreamException ex)
AngularCli\AngularCliMiddleware.cs (1)
79catch (EndOfStreamException ex)
ReactDevelopmentServer\ReactDevelopmentServerMiddleware.cs (1)
93catch (EndOfStreamException ex)
Microsoft.Build (1)
Logging\BinaryLogger\BuildEventArgsReader.cs (1)
243(e is EndOfStreamException && _readStream.BytesCountAllowedToReadRemaining <= 0))
Microsoft.Build.Engine.UnitTests (1)
BuildEventArgsSerialization_Tests.cs (1)
969Assert.Throws<EndOfStreamException>(() => buildEventArgsReader.Read());
Microsoft.CodeAnalysis (1)
Compilation\Compilation.cs (1)
2102catch (EndOfStreamException)
Microsoft.CodeAnalysis.UnitTests (2)
EmbeddedTextTests.cs (2)
61Assert.Throws<EndOfStreamException>(() => EmbeddedText.FromStream("path", new TruncatingStream(10))); 62Assert.Throws<EndOfStreamException>(() => EmbeddedText.FromStream("path", new TruncatingStream(1000)));
Microsoft.DotNet.SignCheckLibrary (1)
Utils.cs (1)
234catch (EndOfStreamException)
Microsoft.ML.Data (1)
Utilities\StreamUtils.cs (1)
257/// <exception cref="EndOfStreamException">
Microsoft.ML.Tests (1)
TextLoaderTests.cs (1)
1407catch (EndOfStreamException)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
318[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.EndOfStreamException))]
netstandard (1)
netstandard.cs (1)
906[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.EndOfStreamException))]
PresentationCore (1)
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (1)
150catch (EndOfStreamException ex)
System.Formats.Nrbf (1)
System\Formats\Nrbf\NrbfDecoder.cs (1)
113/// <exception cref="EndOfStreamException">The end of the stream was reached before reading <see cref="SerializationRecordType.MessageEnd"/> record.</exception>
System.IO (1)
System.IO.cs (1)
11[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.EndOfStreamException))]
System.IO.Compression (4)
System\IO\Compression\ZipArchive.Async.cs (2)
222catch (EndOfStreamException ex) 262catch (EndOfStreamException ex)
System\IO\Compression\ZipArchive.cs (2)
584catch (EndOfStreamException ex) 639catch (EndOfStreamException ex)
System.Private.CoreLib (10)
src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (1)
465/// <exception cref="EndOfStreamException">The end of the stream is reached before filling the <paramref name="buffer" />.</exception>
src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (6)
340/// <exception cref="EndOfStreamException"> 372/// <exception cref="EndOfStreamException"> 410/// <exception cref="EndOfStreamException"> 811/// <exception cref="EndOfStreamException"> 839/// <exception cref="EndOfStreamException"> 871/// <exception cref="EndOfStreamException">
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (3)
547catch (EndOfStreamException eof) 629catch (EndOfStreamException eof) 788catch (EndOfStreamException eof)
System.Resources.Extensions (3)
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (3)
547catch (EndOfStreamException eof) 629catch (EndOfStreamException eof) 788catch (EndOfStreamException eof)
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
294[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.EndOfStreamException))]
System.Runtime.Extensions (1)
System.Runtime.Extensions.cs (1)
41[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.EndOfStreamException))]
System.Security.Cryptography (2)
System\Security\Cryptography\CapiHelper.DSA.Shared.cs (1)
264catch (EndOfStreamException)
System\Security\Cryptography\CapiHelper.Shared.cs (1)
193catch (EndOfStreamException)
System.Transactions.Local (1)
System\Transactions\TransactionManager.cs (1)
185catch (EndOfStreamException e)
System.Windows.Forms (1)
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
2869catch (EndOfStreamException ex)