Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 5
0
 // Using constructor injection to keep components isolated
 public MenuController(IMenuLogic menuLogic)
 {
     _menuLogic = menuLogic;
 }
Ejemplo n.º 6
0
        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));
        }
Ejemplo n.º 7
0
        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));
        }
Ejemplo n.º 8
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="menuLogic">メニュー操作用ロジック</param>
 /// <param name="menus">メニューコード</param>
 public PermissionFilterAttributeImpl(IMenuLogic menuLogic, MenuCode[] menus)
 {
     this.menuLogic = menuLogic;
     this.menus     = menus;
 }
Ejemplo n.º 9
0
 public MenuController(IMenuLogic menuLogic)
 {
     _menuLogic = menuLogic;
 }
Ejemplo n.º 10
0
 public MenuController(IMenuLogic logic)
 {
     this._logic = logic;
 }