Ejemplo n.º 1
0
        public ArticleHomeViewModel(ArticleViewModel articleVm, IArticleApiClient articleApiClient,
                                    ICommentListViewModelFactory commentListViewModelFactory
                                    )
        {
            ArticleViewModel      = articleVm;
            _articleApiClient     = articleApiClient;
            ArticleCommentsListVM = commentListViewModelFactory.Create(LoadEntityListEnum.LoadByIds);

            LoadArticleCommand = new AsyncDelegateCommand(LoadArticle);
        }
Ejemplo n.º 2
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);
        }