コード例 #1
0
        public override bool ConsumePath(int at, string[] fullpath, out string left, out Unifiable after, out int newAt,
                                         SubQuery query)
        {
            if (best != null)
            {
                bool res = best.ConsumePath(at, fullpath, out left, out after, out newAt, query);
                if (res)
                {
                    return(true);
                }
            }
            foreach (Unifiable u in List)
            {
                if (ReferenceEquals(best, u))
                {
                    continue;
                }
                bool res = u.ConsumePath(at, fullpath, out left, out after, out newAt, query);
                if (res)
                {
                    best = u;
                    return(true);
                }
            }

            left  = null;
            after = null;
            newAt = at;
            return(false);
        }