Esempio n. 1
0
            private async Task <TreeNode <MenuItem> > ResolveCurrentNodeAsync(ActionExecutedContext filterContext)
            {
                if (_displayHelper.IsHomePage())
                {
                    return(await _menuService.GetRootNodeAsync("Main"));
                }

                foreach (var menuName in await _menuStorage.GetMenuSystemNamesAsync(true))
                {
                    var selectedNode = await(await _menuService.GetMenuAsync(menuName))?.ResolveCurrentNodeAsync(filterContext);
                    if (selectedNode != null)
                    {
                        return(selectedNode);
                    }
                }

                return(null);
            }