/// <summary> /// Retrieves the length (in bytes) of binary representation /// of the value referenced by the specified key. /// </summary> /// <param name="key">The key</param> /// <returns>The length of binary representation</returns> public long GetRawDataLength(TKey key) { var binaryKey = _keySerializer.Serialize(key); bool isFullMatch; IRadixTreeNode node = FindMostSuitableNode(binaryKey, out _, out _, out isFullMatch); if (isFullMatch) { if (node.ValueReference != null) { return(_valueStorage.GetRawDataLength(node.ValueReference)); } } return(0); }
/// <summary> /// Retrieves the length (in bytes) of binary representation /// of the value referenced by the specified key. /// </summary> /// <param name="key">The key</param> /// <returns>The length of binary representation</returns> public long GetRawDataLength(TKey key) { var entry = FindSuitableEntry(key); return(entry.HasValue ? _valueStorage.GetRawDataLength(entry.Value.Value) : 0); }