private static void CacheAllPaths(ConfigTreeNode node, string parentPath, Dictionary <string, YamlNodeImpl> nodes) { foreach (ConfigTreeNode node2 in node.GetChildren()) { string key = !string.IsNullOrEmpty(parentPath) ? (parentPath + "/" + node2.ConfigPath) : node2.ConfigPath; if (node2.HasYaml()) { nodes.Add(key, (YamlNodeImpl)node2.GetYaml()); } CacheAllPaths(node2, key, nodes); } }
private static void CollectAllLeafPaths(ConfigTreeNode parentNode, string parentPath, List <string> paths) { if (parentNode != null) { foreach (ConfigTreeNode node in parentNode.GetChildren()) { string str = parentPath + "/" + node.ConfigPath; if (node.GetChildren().Count > 0) { CollectAllLeafPaths(node, str, paths); continue; } paths.Add(str); } } }