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

◆ CheckCopyToArguments()

void System.Security.Cryptography.CryptoStream.CheckCopyToArguments ( Stream destination,
int bufferSize )
inlineprivate

Definition at line 610 of file CryptoStream.cs.

611 {
612 if (destination == null)
613 {
614 throw new ArgumentNullException("destination");
615 }
616 EnsureNotDisposed(destination, "destination");
617 if (!destination.CanWrite)
618 {
619 throw new NotSupportedException(System.SR.NotSupported_UnwritableStream);
620 }
621 if (bufferSize <= 0)
622 {
623 throw new ArgumentOutOfRangeException("bufferSize", System.SR.ArgumentOutOfRange_NeedPosNum);
624 }
625 if (!CanRead)
626 {
627 throw new NotSupportedException(System.SR.NotSupported_UnreadableStream);
628 }
629 }
static string ArgumentOutOfRange_NeedPosNum
Definition SR.cs:20
static string NotSupported_UnwritableStream
Definition SR.cs:30
static string NotSupported_UnreadableStream
Definition SR.cs:32
Definition SR.cs:7
static void EnsureNotDisposed(Stream stream, string objectName)

References System.SR.ArgumentOutOfRange_NeedPosNum, System.Security.Cryptography.CryptoStream.CanRead, System.destination, System.Security.Cryptography.CryptoStream.EnsureNotDisposed(), System.SR.NotSupported_UnreadableStream, and System.SR.NotSupported_UnwritableStream.

Referenced by System.Security.Cryptography.CryptoStream.CopyTo(), and System.Security.Cryptography.CryptoStream.CopyToAsync().