public MenuBuilderContext AddSeparator() { var separator = new SeparatorMenuItem(); var menuData = new MenuData { Level = _current.Level, Item = separator, Type = MenuType.Separator }; _current = menuData; _menuDatas.Add(menuData); return(this); }
public MenuBuilderContext Add(string routeName, string resourceKey, object routeValues, params string[] tags) { var clickable = new MenuItem(routeName, resourceKey, routeValues); var menuData = new MenuData { Level = MenuItemLevel.Parent, Item = clickable, Type = MenuType.Clickable }; menuData.AddTags(tags); _current = menuData; _menuDatas.Add(menuData); return(this); }
public MenuBuilderContext AddNonClickable(string resourceKey, params string[] tags) { var nonClickable = new NonClickableMenuItem(resourceKey); var menuData = new MenuData { Level = MenuItemLevel.Root, Item = nonClickable, Type = MenuType.NonClickable }; menuData.AddTags(tags); _current = menuData; _menuDatas.Add(menuData); return(this); }