Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ValidateCopyToArguments()

static void System.IO.Stream.ValidateCopyToArguments ( Stream destination,
int bufferSize )
inlinestaticprotectedinherited

Definition at line 1060 of file Stream.cs.

1061 {
1062 if (destination == null)
1063 {
1064 throw new ArgumentNullException("destination");
1065 }
1066 if (bufferSize <= 0)
1067 {
1068 throw new ArgumentOutOfRangeException("bufferSize", bufferSize, SR.ArgumentOutOfRange_NeedPosNum);
1069 }
1070 if (!destination.CanWrite)
1071 {
1072 if (destination.CanRead)
1073 {
1074 ThrowHelper.ThrowNotSupportedException_UnwritableStream();
1075 }
1076 ThrowHelper.ThrowObjectDisposedException_StreamClosed(destination.GetType().Name);
1077 }
1078 }

References System.SR.ArgumentOutOfRange_NeedPosNum, System.destination, System.ThrowHelper.ThrowNotSupportedException_UnwritableStream(), and System.ThrowHelper.ThrowObjectDisposedException_StreamClosed().

Referenced by System.IO.Compression.DeflateStream.CopyTo(), System.IO.ReadOnlyMemoryStream.CopyTo(), System.Net.Http.Http2Connection.Http2Stream.Http2ReadStream.CopyTo(), System.IO.BufferedStream.CopyTo(), System.IO.FileStream.CopyTo(), System.IO.MemoryStream.CopyTo(), System.IO.Stream.CopyTo(), System.IO.Compression.DeflateStream.CopyToAsync(), System.IO.ReadOnlyMemoryStream.CopyToAsync(), System.Net.Http.DecompressionHandler.DeflateDecompressedContent.ZLibOrDeflateStream.PeekFirstByteReadStream.CopyToAsync(), System.Net.Http.DecompressionHandler.DeflateDecompressedContent.ZLibOrDeflateStream.CopyToAsync(), System.Net.Http.EmptyReadStream.CopyToAsync(), System.Net.Http.Http2Connection.Http2Stream.Http2ReadStream.CopyToAsync(), System.Net.Http.HttpConnection.ChunkedEncodingReadStream.CopyToAsync(), System.Net.Http.HttpConnection.ConnectionCloseReadStream.CopyToAsync(), System.Net.Http.HttpConnection.ContentLengthReadStream.CopyToAsync(), System.Net.Http.HttpConnection.RawConnectionStream.CopyToAsync(), System.Net.Http.HttpContent.LimitMemoryStream.CopyToAsync(), System.IO.BufferedStream.CopyToAsync(), System.IO.FileStream.CopyToAsync(), System.IO.MemoryStream.CopyToAsync(), and System.IO.Stream.CopyToAsync().