public override void Sync() { if (MemoryMapNativeMethods.FlushViewOfFile(PagerState.MapBase, new IntPtr(PagerState.Accessor.Capacity)) == false) { throw new Win32Exception(); } if (MemoryMapNativeMethods.FlushFileBuffers(_handle) == false) { throw new Win32Exception(); } }
public override void Sync() { if (PagerState.AllocationInfos.Any(allocationInfo => MemoryMapNativeMethods.FlushViewOfFile(allocationInfo.BaseAddress, new IntPtr(allocationInfo.Size)) == false)) { throw new Win32Exception(); } if (MemoryMapNativeMethods.FlushFileBuffers(_handle) == false) { throw new Win32Exception(); } }