예제 #1
0
 public static DbResult db_read_next(
     ReaderHandle reader,
     out DbKey key,
     IntPtr valueBuf,
     UIntPtr valueBufLen,
     out UIntPtr actualValueLen,
     bool check = true)
 {
     return(MaybeCheck(_db_read_next(reader, out key, valueBuf, valueBufLen, out actualValueLen), check));
 }
예제 #2
0
        /// <summary>
        /// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </summary>
        /// <returns>
        /// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </returns>
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder(GetType().ToString());

            builder.Append(": ");
            builder.Append("DbKey: ");
            builder.Append(DbKey.ToString());
            builder.Append(", ");
            builder.Append("Guid: ");
            builder.Append(Guid);
            return(builder.ToString());
        }
예제 #3
0
        public Key(string key)
        {
            if (key.Length < 10)
            {
                throw new ArgumentException("The key is too short", nameof(key));
            }
            if (key[8] != '-')
            {
                throw new Exception("The key is in an invalid format");
            }

            var hi = key.Substring(0, 8);
            var lo = Convert.ToUInt64(key.Substring(9));

            _key = BuildDbKey(hi, lo);
        }
예제 #4
0
 public Key(string hi, ulong lo)
 {
     _key = BuildDbKey(hi, lo);
 }
예제 #5
0
 internal Key(DbKey key)
 {
     _key = key;
 }
예제 #6
0
 private static extern DbResult _db_read_next(
     ReaderHandle reader,
     out DbKey key,
     IntPtr valueBuf,
     UIntPtr valueBufLen,
     out UIntPtr actualValueLen);