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