public ArticlePresentationModel(IArticleView view, INewsFeedService newsFeedService)
 {
     View = view;
     View.Model = this;
     this.newsFeedService = newsFeedService;
     View.ShowNewsReader += View_ShowNewsReader;
 }
Exemplo n.º 2
0
        public ArticleViewModel(INewsFeedService newsFeedService, IRegionManager regionManager, IEventAggregator eventAggregator)
        {
            if (newsFeedService == null)
            {
                throw new ArgumentNullException("newsFeedService");
            }

            if (regionManager == null)
            {
                throw new ArgumentNullException("regionManager");
            }

            if (eventAggregator == null)
            {
                throw new ArgumentNullException("eventAggregator");
            }

            this.newsFeedService = newsFeedService;
            this.regionManager = regionManager;

            this.showArticleListCommand = new DelegateCommand(this.ShowArticleList);
            this.showNewsReaderViewCommand = new DelegateCommand(this.ShowNewsReaderView);

            eventAggregator.GetEvent<TickerSymbolSelectedEvent>().Subscribe(OnTickerSymbolSelected, ThreadOption.UIThread);
        }
Exemplo n.º 3
0
 public NewsFeedController()
 {
     newsFeedService = new NewsFeedService();
 }