Ejemplo n.º 1
0
        internal bool InternalGet(TangleKey key, out T value)
        {
            long nodeIndex;
            uint valueIndex;

            if (!BTree.FindKey(key, false, out nodeIndex, out valueIndex))
            {
                value = default(T);
                return(false);
            }

            using (var range = BTree.AccessValue(nodeIndex, valueIndex)) {
                var pEntry = (BTreeValue *)range.Pointer;
                BTree.ReadData(ref *pEntry, Deserializer, out value);
            }

            return(true);
        }