private void Write(PageCursor cursor, TreeState origin) { TreeState.Write(cursor, origin.StableGeneration(), origin.UnstableGeneration(), origin.RootId(), origin.RootGeneration(), origin.LastId(), origin.FreeListWritePageId(), origin.FreeListReadPageId(), origin.FreeListWritePos(), origin.FreeListReadPos(), origin.Clean); }
public static IndexCorruption <KEY, VALUE> setTreeState <KEY, VALUE>(TreeState target) { return((pagedFile, layout, node, treeState) => { using (PageCursor cursor = pagedFile.io(0, PagedFile.PF_SHARED_WRITE_LOCK)) { goTo(cursor, "", treeState.pageId()); // Write new tree state to current tree states page TreeState.Write(cursor, target.StableGeneration(), target.UnstableGeneration(), target.RootId(), target.RootGeneration(), target.LastId(), target.FreeListWritePageId(), target.FreeListReadPageId(), target.FreeListWritePos(), target.FreeListReadPos(), target.Clean); } }); }