/// <summary> /// Find all keys (non-unique), string /// </summary> /// <param name="key"></param> /// <param name="op">0 - equal; -1 - nearest left (less than); 1 - nearest right (more than) </param> /// <returns></returns> public BTResultList FindAll(string key, int op) { int i = find(VSLib.ConvertStringToByte(key), op); BTResultList ret = new BTResultList(); ret.KeyString = (i < 0) ? "" : VSLib.ConvertByteToString(BTree[i].Key); ret.Value = (i < 0) ? new long[0] : BTree[i].Value.ToArray(); return(ret); }
/// <summary> /// Find all keys (non-unique), long /// </summary> /// <param name="key"></param> /// <param name="op">0 - equal; -1 - nearest left (less than); 1 - nearest right (more than) </param> /// <returns></returns> public BTResultList FindAll(long key, int op) { int i = find(VSLib.ConvertLongToByteReverse(key), op); BTResultList ret = new BTResultList(); ret.Key = (i < 0) ? -1 : VSLib.ConvertByteToLongReverse(BTree[i].Key); ret.Value = (i < 0) ? new long[0] : BTree[i].Value.ToArray(); return(ret); }