public StreamRange(StreamRef stream, ViewCache.CacheEntry cacheEntry, long offset, uint size) { Stream = stream; CacheEntry = cacheEntry; View = null; Offset = offset; Size = size; Buffer = cacheEntry.Buffer; IsDisposed = false; unchecked { Pointer = cacheEntry.Pointer + cacheEntry.PointerOffset; Pointer += (offset - cacheEntry.Offset); } }
public StreamRange(StreamRef stream, MemoryMappedViewAccessor view, long offset, uint size, long actualOffset, long actualSize) { Stream = stream; View = view; CacheEntry = default(ViewCache.CacheEntry); Offset = offset; Size = size; Buffer = view.GetSafeBuffer(); Pointer = null; Buffer.AcquirePointer(ref Pointer); IsDisposed = false; unchecked { Pointer += view.GetPointerOffset(); Pointer += (offset - actualOffset); } }