public ReadOnlyCursor OpenReadOnlyCursor(ReadOnlyTransaction txn) { CursorImpl cursorImpl; if (txn._impl.IsReadOnly) { cursorImpl = ReadCursorPool.Rent(); if (cursorImpl == null) { cursorImpl = CursorImpl.Create(this, txn._impl, true); } else { cursorImpl.Renew(txn._impl); } } else { cursorImpl = CursorImpl.Create(this, txn._impl, true); } return(new ReadOnlyCursor(cursorImpl)); }
/// <summary> /// Open Read/Write cursor. /// </summary> public Cursor OpenCursor(Transaction txn) { return(new Cursor(CursorImpl.Create(this, txn._impl, false))); }