private static void AddChildrenToStringBuilder(ZkClient zkClient, Func<string, bool> pathFilter, int level, StringBuilder builder, string startPath) { var children = zkClient.GetChildren(startPath); foreach (var node in children) { string nestedPath; if (startPath.EndsWith("/")) { nestedPath = startPath + node; } else { nestedPath = startPath + "/" + node; } if (pathFilter(nestedPath)) { builder.Append(GetSpaces(level - 1) + "'-" + "+" + node + "\n"); AddChildrenToStringBuilder(zkClient, pathFilter, level + 1, builder, nestedPath); } else { builder.Append(GetSpaces(level - 1) + "'-" + "-" + node + " (contents hidden)\n"); } } }
public List <Tuple <string, string> > GetZKChildrenValues(string path) { var children = ZkClient.GetChildren(path).OrderBy(x => x).ToList(); return (children.Select(partition => Tuple.Create(partition, ZkClient.ReadData <string>(path + "/" + partition))) .ToList()); }
public static IList <string> GetChildrenParentMayNotExist(ZkClient client, string path) { try { return(client.GetChildren(path)); } catch (ZkNoNodeException) { return(null); } }
public static IList<string> GetChildrenParentMayNotExist(ZkClient client, string path) { try { return client.GetChildren(path); } catch (ZkNoNodeException) { return null; } }
public static List<string> GetChildren(ZkClient zkClient, string path) { return zkClient.GetChildren(path); }
public static IEnumerable<string> GetChildren(ZkClient zkClient, string path) { return zkClient.GetChildren(path); }
public static List <string> GetChildren(ZkClient zkClient, string path) { return(zkClient.GetChildren(path)); }