private UserTabStateModel GetUserTabsAsync(ClaimsPrincipal user) { TabSettings tabSettings = new TabSettings("Home", "/"); List <TabSettings> listTabSettngs = new List <TabSettings>(); listTabSettngs.Add(tabSettings); var userTabState = new UserTabStateModel(user, listTabSettngs); return(userTabState); }
public UserTabStateModel GetTabSettingsTest() { // NOTE TO SELF: Self contained view componenets // https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-components?view=aspnetcore-2.1 // TODO: Self contained view componenets List <TabSettings> tabs = new List <TabSettings>(); TabSettings t1 = new TabSettings("About", "\\about", new Microsoft.AspNetCore.Http.QueryString("?test=nope&woot=9000")); TabSettings t2 = new TabSettings("Home", ""); TabSettings t3 = new TabSettings("Privacy", "\\privacy"); tabs.Add(t1); tabs.Add(t2); tabs.Add(t3); UserTabStateModel userTabState = new UserTabStateModel(User, tabs); return(userTabState); }
public BaseController() { userTabStateModel = GetTabSettingsTest(); ViewData["UserTabStateModel"] = userTabStateModel; }