Merge branch 'FIX'
commit
94e648406b
|
@ -248,6 +248,18 @@ namespace ln.types
|
|||
return slice;
|
||||
}
|
||||
|
||||
public static string ToHexString(this byte[] bytes)
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
|
||||
for (int n = 0; n < bytes.Length; n ++)
|
||||
{
|
||||
stringBuilder.AppendFormat("{0:X2}", bytes[n]);
|
||||
}
|
||||
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
public static string HexDump(this byte[] bytes)
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
|
|
|
@ -99,6 +99,14 @@ namespace ln.types.btree
|
|||
return false;
|
||||
}
|
||||
|
||||
public int Count(K key)
|
||||
{
|
||||
List<V> _values = null;
|
||||
if ((!bTree.TryGet(key, ref _values)) || (_values.Count == 0))
|
||||
return 0;
|
||||
return _values.Count;
|
||||
}
|
||||
|
||||
public IEnumerable<K> Keys => bTree.Keys;
|
||||
public IEnumerable<V> Values => bTree.Values.SelectMany(vl => vl);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue