Ejemplo n.º 1
0
        public ProfileViewModel(IEventAggregator ea,
                                PrivateUserViewModel privateUserViewModel,

                                IBoardListViewModelFactory boardListViewModelFactory,
                                IArticleListViewModelFactory articleListViewModelFactory,
                                ICommentListViewModelFactory commentListViewModelFactory)
        {
            _ea = ea;
            PrivateUserViewModel = privateUserViewModel;

            BoardsModeratingListViewModel = boardListViewModelFactory.Create(LoadEntityListEnum.LoadByIds);
            BoardsSubscribedListViewModel = boardListViewModelFactory.Create(LoadEntityListEnum.LoadByIds);

            ArticlesWrittenListViewModel = articleListViewModelFactory.Create(LoadEntityListEnum.LoadByIds);
            ArticlesSavedListViewModel   = articleListViewModelFactory.Create(LoadEntityListEnum.LoadByIds);
            CommentsWrittenListViewModel = commentListViewModelFactory.Create(LoadEntityListEnum.LoadByIds);
            CommentsSavedListViewModel   = commentListViewModelFactory.Create(LoadEntityListEnum.LoadByIds);

            LogoutCommand      = new DelegateCommand(Logout);
            LoadProfileCommand = new AsyncDelegateCommand(LoadProfileAsync);
        }
Ejemplo n.º 2
0
        public BoardHomeViewModel(
            BoardViewModel boardVM,
            IArticleListViewModelFactory articleListViewModelFactory,
            IArticleCreationViewModelFactory articleCreationViewModelFactory
            )
        {
            BoardViewModel     = boardVM;
            BoardArticleListVM = articleListViewModelFactory.Create(LoadEntityListEnum.LoadByIds);
            ArticleCreationVm  = articleCreationViewModelFactory.Create(boardVM.Board);

            LoadBoardCommand = new AsyncDelegateCommand(LoadBoard);
        }