Amazon.Runtime.Internal.Util.PartialWrapperStream.PartialWrapperStream C# (CSharp) Метод

PartialWrapperStream() публичный Метод

public PartialWrapperStream ( Stream stream, long partSize ) : System
stream Stream
partSize long
Результат System
        public PartialWrapperStream(Stream stream, long partSize)
            : base(stream)
        {
            if (!stream.CanSeek)
                throw new InvalidOperationException("Base stream of PartialWrapperStream must be seekable");

            this.initialPosition = stream.Position;
            long remainingData = stream.Length - stream.Position;
            if (partSize == 0 || remainingData < partSize)
            {
                this.partSize = remainingData;
            }
            else
            {

                this.partSize = partSize;

#if !PCL && !UNITY

                var encryptionStream = BaseStream as AESEncryptionUploadPartStream;
                if (encryptionStream != null && (partSize % 16) != 0)
                {
                    this.partSize = partSize - (partSize % EncryptUploadPartStream.InternalEncryptionBlockSize);
                }
#endif
            }
        }