Beispiel #1
0
 public PathNav(string value, PathNavTypes type, PathNav next, bool root)
 {
     Next    = next;
     Value   = value;
     NavType = type;
     IsRoot  = root;
 }
Beispiel #2
0
        private static PathNav MakePathNavImpl(List <string> pathSegments)
        {
            PathNav current = null;

            for (var i = pathSegments.Count - 1; i >= 0; --i)
            {
                //TODO 检测 segment 是否是数组,形如 A[0] 或 A[1][2]
                current = new PathNav(pathSegments[i], PathNavTypes.Normal, current, i == 0);
            }

            return(current);
        }