Exemplo n.º 1
0
 internal void GetCursorValue(IntPtr cursor, Action <string> action)
 {
     Libunqlite.unqlite_kv_cursor_data_callback(cursor,
                                                (dataPointer, dataLen, pUserData) =>
     {
         string value = Marshal.PtrToStringAnsi(dataPointer, (int)dataLen);
         action(value);
         return(0);
     }, null);
 }
Exemplo n.º 2
0
 internal void GetCursorValue(IntPtr cursor, Action <byte[]> action)
 {
     Libunqlite.unqlite_kv_cursor_data_callback(cursor,
                                                (dataPointer, dataLen, pUserData) =>
     {
         byte[] buffer = new byte[dataLen];
         Marshal.Copy(dataPointer, buffer, 0, (int)dataLen);
         action(buffer);
         return(0);
     }, null);
 }