Esempio n. 1
0
 private void CloseCurrentStream()
 {
     if (mCurrentStream != null)
     {
         mCurrentStream.Dispose();
         mCurrentStream = null;
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Opens the current stream. Can only be called once per stream.
        /// Disposing the returned stream is allowed but not required.
        /// </summary>
        public Stream OpenStream()
        {
            if (this.CurrentStreamIndex == this.StreamCount)
            {
                throw new InvalidOperationException("The reader contains no more streams.");
            }

            if (mCurrentStream != null)
            {
                throw new InvalidOperationException("Each stream can only be opened once.");
            }

            mCurrentStream = new DecodedStream(mDecodedStream, this.CurrentStreamLength);

            return(mCurrentStream);
        }
Esempio n. 3
0
        /// <summary>
        /// Opens the current stream. Can only be called once per stream.
        /// Disposing the returned stream is allowed but not required.
        /// </summary>
        public Stream OpenStream()
        {
            if (this.CurrentStreamIndex == this.StreamCount)
                throw new InvalidOperationException("The reader contains no more streams.");

            if (mCurrentStream != null)
                throw new InvalidOperationException("Each stream can only be opened once.");

            mCurrentStream = new DecodedStream(mDecodedStream, this.CurrentStreamLength);

            return mCurrentStream;
        }
Esempio n. 4
0
 private void CloseCurrentStream()
 {
     if (mCurrentStream != null)
     {
         mCurrentStream.Dispose();
         mCurrentStream = null;
     }
 }