public CacheEntry(MemoryMappedViewAccessor view, long offset, uint size) { CreatedWhen = Time.Ticks; View = view; Offset = offset; Size = size; IsDisposed = false; _RefCount = 1; Buffer = view.GetSafeBuffer(); Pointer = null; Buffer.AcquirePointer(ref Pointer); PointerOffset = view.GetPointerOffset(); }
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); } }