private static NavigationHubStatus OnQueryStatusCallback( NavigationHub hub, TfsWebContext tfsWebContext, ControllerBase controller) { if (tfsWebContext == null) { return(null); } // this gets the appropriate route name for the NavigationContextLevel of the current context. var controllerActionRouteName = TfsRouteHelpers.GetControllerActionRouteName(tfsWebContext); // builds the ActionLink using that NavigationContextLevel appropriate route var actionLink = tfsWebContext.Url.RouteUrl( controllerActionRouteName, "index", "customhome", new { routeArea = string.Empty }); return(new NavigationHubStatus(hub) { HubGroup = WellKnownHubGroup.Custom, HubGroupDisplayText = CustomAreaName, DisplayText = "Echo", CommandId = "Custom.CustomHome.Index", Order = 100, ActionLink = actionLink, ActionArguments = new { message = "None" }, Selected = controller is CustomHomeController }); }
private static NavigationHubStatus OnQueryStatusCallback( NavigationHub hub, TfsWebContext tfsWebContext, ControllerBase controller) { if (tfsWebContext == null) { return null; } // this gets the appropriate route name for the NavigationContextLevel of the current context. var controllerActionRouteName = TfsRouteHelpers.GetControllerActionRouteName(tfsWebContext); // builds the ActionLink using that NavigationContextLevel appropriate route var actionLink = tfsWebContext.Url.RouteUrl( controllerActionRouteName, "index", "customhome", new { routeArea = string.Empty }); return new NavigationHubStatus(hub) { HubGroup = WellKnownHubGroup.Custom, HubGroupDisplayText = CustomAreaName, DisplayText = "Echo", CommandId = "Custom.CustomHome.Index", Order = 100, ActionLink = actionLink, ActionArguments = new { message = "None" }, Selected = controller is CustomHomeController }; }
private static NavigationHub CreateHub() { var customHub = new NavigationHub { NavigationLevels = CustomAreaLevels, QueryStatusCallback = OnQueryStatusCallback }; return(customHub); }
private static NavigationHub CreateHub() { var customHub = new NavigationHub { NavigationLevels = CustomAreaLevels, QueryStatusCallback = OnQueryStatusCallback }; return customHub; }