Esempio n. 1
0
        public void OnProvidersExecuting(NavigationProviderContext context)
        {
            var mainMenu = new MenuDefinition { Id = MenuNames.Main };
            var menuBuilder = new MenuBuilder(mainMenu);

            menuBuilder.Add(new LocalizedString("About", "About"), t => t.Href(helper => "http://yandex.ru"));

            menuBuilder.Build();

            context.Results.Add(mainMenu);
        }
Esempio n. 2
0
        public void OnProvidersExecuting(NavigationProviderContext context)
        {
            var menu = new MenuDefinition { Id = MenuNames.Admin };

            foreach (var adminMenuProvider in _providers)
            {
                var builder = new MenuBuilder(menu);
                adminMenuProvider.ConfigureAdminMenu(builder);
                builder.Build();
            }

            context.Results.Add(menu);
        }