Exemple #1
0
        public static async Task <bool> DeleteRecursiveAsync(this IZookeeperClient client, string path)
        {
            IEnumerable <string> children;

            try
            {
                children = await client.GetChildrenAsync(path);
            }
            catch (KeeperException.NoNodeException)
            {
                return(true);
            }

            foreach (string subPath in children)
            {
                if (!await client.DeleteRecursiveAsync(path + "/" + subPath))
                {
                    return(false);
                }
            }
            await client.DeleteAsync(path);

            return(true);
        }
Exemple #2
0
        public async Task GetChildrenAsyncTest()
        {
            var childrens = await _client.GetChildrenAsync("/");

            //childrens = await _client.GetChildrenAsync("/ApiRouteRoot");
        }