/// <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); }
/// <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); }