예제 #1
0
        public IEnumerable <GathererConfigNode> TryGetNodes(string path)
        {
            path = path.Replace("\\", "/");
            int f = path.IndexOf("/");

            if (f == -1)
            {
                return(Nodes.Where(o => o.Name == path));
            }

            string             name = path.Substring(0, f);
            GathererConfigNode node = Nodes.FirstOrDefault(o => o.Name == name);

            if (node == null)
            {
                return(new List <GathererConfigNode>());
            }
            return(node.TryGetNodes(path.Substring(f + 1)));
        }
예제 #2
0
 public IEnumerable <GathererConfigNode> TryGetNodes(string path)
 {
     return(rootNode.TryGetNodes(path));
 }