public UserController(IUserLogic userLogic, IMenuLogic menuLogic, IJwtServices jwt, IOptions <AppSettings> appSettings) { this._jwtServices = jwt; this._userService = userLogic; this._menuService = menuLogic; this._appSettings = appSettings.Value; this._userService.ConnectionString = this._appSettings.ConString; this._menuService.ConnectionString = this._appSettings.ConString; }
public MenuController( IMenuLogic menuLogic, IRoleRepository roleRepository, IUnitOfWork unitOfWork, IHttpContextAccessor accessor) : base(accessor) { this.menuLogic = menuLogic; this.roleRepository = roleRepository; this.unitOfWork = unitOfWork; }
public void SetUp() { _menu = GetInst <IMenuLogic>(); base.Setup(); }
protected T CreateTestControllerWith <T>(IMenuLogic menu = null) where T : ApiController, new() { menu = useOrDefault <IMenuLogic>(menu, _menu); return(new MenuController(menu) as T); }
// Using constructor injection to keep components isolated public MenuController(IMenuLogic menuLogic) { _menuLogic = menuLogic; }
public async Task <IActionResult> GetAccessibleMenuList([FromQuery] string lang, [FromServices] IMenuLogic menuLogic) { var menus = await menuLogic.GetTopMenuListAsync(); var result = menus.Select(m => new MenuListOutputModel(m, lang)); return(JsonOK(result)); }
public async Task <IActionResult> GetAccessibleMenuTree([FromQuery] string lang, [FromServices] IMenuLogic menuLogic) { var result = new List <MenuTreeOutputModel>(); var menus = await menuLogic.GetSideMenuListAsync(); foreach (var menu in menus) { result.Add(MenuTreeOutputModel.GenerateMenu(menu, lang)); } return(JsonOK(result)); }
/// <summary> /// コンストラクタ /// </summary> /// <param name="menuLogic">メニュー操作用ロジック</param> /// <param name="menus">メニューコード</param> public PermissionFilterAttributeImpl(IMenuLogic menuLogic, MenuCode[] menus) { this.menuLogic = menuLogic; this.menus = menus; }
public MenuController(IMenuLogic menuLogic) { _menuLogic = menuLogic; }
public MenuController(IMenuLogic logic) { this._logic = logic; }