예제 #1
0
 public void ReadKey(int ofs, int len, byte[] buf, int bufOfs)
 {
     lock (_log)
     {
         _log.WriteUInt8((byte)KVReplayOperation.ReadKey);
         _log.WriteVUInt32(TrIndex);
         _log.WriteVInt32(ofs);
         _log.WriteVInt32(len);
         _log.WriteVInt32(bufOfs);
         _log.FlushBuffer();
     }
     _tr.ReadKey(ofs, len, buf, bufOfs);
 }
예제 #2
0
        public static byte[] ReadKey(this IKeyValueDBTransaction transaction)
        {
            int keySize = transaction.GetKeySize();

            if (keySize < 0)
            {
                return(null);
            }
            var result = new byte[keySize];

            transaction.ReadKey(0, keySize, result, 0);
            return(result);
        }