示例#1
0
        /// <summary>
        /// 从子节点中查找id
        /// </summary>
        private int GetIDInNext(ref T target)
        {
            int           result = 0;
            IntegerID <T> next   = !HasNext?AddNext() : mNext;

            while (next != null)
            {
                result = next.GetID(ref target);
                if (result < int.MaxValue)
                {
                    return(result);
                }
                else
                {
                    next = next.Next;
                }
            }
            return(result);
        }
示例#2
0
 public bool ContainsKey(ref MapperValueT key, out int id)
 {
     id = mIndexer.GetID(ref key);
     return(mMapper != default ? mMapper.ContainsKey(id) : false);
 }