MenuControllerBase¶
Extends WebContextControllerBase to additionally decorate the current view model with the session-cached Business Online menu, the current menu item, the controller's declared category, and whether the current user is external.
Purpose¶
- Extends
WebContextControllerBaseto additionally decorate the current view model with the session-cached Business Online menu, the current menu item, the controller's declared category, and whether the current user is external. - Every consuming application's controllers ultimately derive from this class to get menu rendering support.
Context¶
- Namespace:
SAIF.Web.Mvc.Controllers - Assembly/package:
SAIF.Framework.Web.Mvc (source-shipping NuGet package) - Kind: abstract class
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| ApplicationUser | protected IApplicationUserProfile ApplicationUser { get; } |
Lazily resolved and request-memoized current user, used to determine IsExternalUser. |
| UserProfileService | public IUserProfileService UserProfileService { get; set; } |
Property-injected service used to resolve ApplicationUser. |
| MenuCategory | protected abstract string MenuCategory { get; } |
Category code the derived controller must supply; used to filter RenderTopMenu output. |
| MenuControllerBase(IMenuService, IWebContextService, IUserProfileService) | protected MenuControllerBase(IMenuService menuService, IWebContextService webContextService, IUserProfileService userProfileService) |
Constructor-injects the services this base class and its parent need. |
| OnActionExecuted(ActionExecutedContext) | protected override void OnActionExecuted(ActionExecutedContext filterContext) |
Builds/reuses the cached menu and decorates the view model; see the "Build and attach the Business Online menu" operation. |
Sources¶
src/Web.Mvc/Controllers/MenuControllerBase.cs