Ejemplo n.º 1
0
        public IMenu Execute(params string[] args)
        {
            int postId = int.Parse(args[0]);

            IIdHoldingMenu menu = (IIdHoldingMenu)this.menuFactory.CreateMenu("AddReplyMenu");

            menu.SetId(postId);

            return(menu);
        }
Ejemplo n.º 2
0
        public IMenu Execute(params string[] args)
        {
            string commandName = this.GetType().Name;
            string menuName    = commandName.Substring(0, commandName.Length - "Command".Length) + "Menu";

            int            postId = int.Parse(args[0]);
            IIdHoldingMenu menu   = (IIdHoldingMenu)this.menuFactory.CreateMenu(menuName);

            menu.SetId(postId);
            return(menu);
        }
Ejemplo n.º 3
0
        public IMenu Execute(params string[] args)
        {
            int categoryId = int.Parse(args[0]);

            string commandName = this.GetType().Name;
            string menuName    = commandName.Substring(0, commandName.Length - Suffix.Length);

            IIdHoldingMenu menu = (IIdHoldingMenu)this.menuFactory.CreateMenu(menuName);

            menu.SetId(categoryId);

            return(menu);
        }
        public IMenu Execute(params string[] args)
        {
            int categoryId = int.Parse(args[0]);

            IEnumerable <IPostInfoViewModel> posts = this.postService
                                                     .GetCategoryPostsInfo(categoryId);

            string commandName = this.GetType().Name;

            string menuName = commandName.Substring(0, commandName.Length -
                                                    "Command".Length);

            IIdHoldingMenu menu = (IIdHoldingMenu)this.menuFactory.CreateMenu(menuName);

            menu.SetId(categoryId);

            return(menu);
        }