public async Task <TreeNode <NavigationNode> > GetTree()
        {
            var builder  = GetRootTreeBuilder();
            var cacheKey = await _cacheKeyResolver.GetCacheKey(builder);

            var tree = await _treeCache.GetTree(cacheKey).ConfigureAwait(false);

            if (tree != null)
            {
                return(tree);
            }
            tree = await builder.BuildTree(this).ConfigureAwait(false);

            if (_navOptions.RootTreeBuilderName != Constants.ReflectionNavigationTreeBuilderName &&
                !string.IsNullOrEmpty(_navOptions.IncludeAssembliesForScan))
            {
                var helper = new NavigationTreeReflectionConverter();
                await helper.ScanAndMerge(this, _navOptions.IncludeAssembliesForScan, tree).ConfigureAwait(false);
            }
            if (_navOptions.EnableSorting)
            {
                SortTreeNode(tree);
            }
            await _treeCache.AddToCache(tree, cacheKey);

            return(tree);
        }
        public async Task <TreeNode <NavigationNode> > GetTree()
        {
            var builder  = GetRootTreeBuilder();
            var cacheKey = cacheKeyResolver.GetCacheKey(builder);
            var tree     = await treeCache.GetTree(cacheKey).ConfigureAwait(false);

            if (tree != null)
            {
                return(tree);
            }
            tree = await builder.BuildTree(this).ConfigureAwait(false);

            treeCache.AddToCache(tree, cacheKey);

            return(tree);
        }