Esempio n. 1
0
        /// <summary>Begin the concept of a virtual buffer</summary>
        /// <param name="bufferLength">Virtual buffer's byte length</param>
        /// <returns></returns>
        public static IO.IKSoftStreamWithVirtualBufferCleanup EnterVirtualBuffer(this IO.IKSoftStreamWithVirtualBuffer stream,
                                                                                 long bufferLength)
        {
            Contract.Requires <ArgumentOutOfRangeException>(bufferLength > 0);

            stream.VirtualBufferStart  = stream.BaseStream.Position;
            stream.VirtualBufferLength = bufferLength;

            return(new IO.IKSoftStreamWithVirtualBufferCleanup(stream));
        }
Esempio n. 2
0
        /// <summary>
        /// Temporarily bookmark this stream's VirtualBuffer properties and begin the concept of a virtual buffer
        /// </summary>
        /// <returns></returns>
        public static IO.IKSoftStreamWithVirtualBufferAndBookmark EnterVirtualBufferWithBookmark(this IO.IKSoftStreamWithVirtualBuffer stream,
                                                                                                 long bufferLength)
        {
            Contract.Requires <ArgumentOutOfRangeException>(bufferLength > 0);

            return(new IO.IKSoftStreamWithVirtualBufferAndBookmark(stream, bufferLength));
        }
Esempio n. 3
0
 /// <summary>Temporarily bookmark this stream's VirtualBuffer properties</summary>
 /// <returns></returns>
 public static IO.IKSoftStreamWithVirtualBufferBookmark EnterVirtualBufferBookmark(this IO.IKSoftStreamWithVirtualBuffer stream)
 {
     return(new IO.IKSoftStreamWithVirtualBufferBookmark(stream));
 }
Esempio n. 4
0
 /// <summary>Begin the concept of a virtual buffer</summary>
 /// <returns></returns>
 public static IO.IKSoftStreamWithVirtualBufferCleanup EnterVirtualBuffer(this IO.IKSoftStreamWithVirtualBuffer stream)
 {
     return(new IO.IKSoftStreamWithVirtualBufferCleanup(stream));
 }