Beispiel #1
0
        /// <summary>
        /// Transfers the buffer contained by this <see cref="BufferSession"/> to a
        /// new read-only <see cref="Stream"/>.
        /// </summary>
        /// <returns>The stream containing the buffer.</returns>
        public Stream ToReadOnlyStream()
        {
            var stream = new BufferSessionStream(this).MakeReadOnly();

            _result = default;
            return(stream);
        }
Beispiel #2
0
        /// <summary>
        /// Transfers the buffer contained by this <see cref="BufferSession"/> to a
        /// new <see cref="Stream"/>.
        /// </summary>
        /// <returns>The stream containing the buffer.</returns>
        public Stream ToStream()
        {
            var stream = new BufferSessionStream(this);

            _result = default;
            return(stream);
        }