예제 #1
0
        /// <summary>
        /// Assumption: If any data is invalid the whole feed stops processing.
        /// </summary>
        public void ProcessAndDisplay()
        {
            foreach (var user in _userReader.ReadAll())
            {
                AddUser(user.User, user.Follows);
            }

            foreach (var tweet in _tweetReader.ReadAll())
            {
                AddTweet(tweet);
            }

            _view.Display(_userFeeds.Values.OrderBy(uf => uf.User.ToString()));
        }
예제 #2
0
        public void Display()
        {
            foreach (var user in _userReader.ReadAll())
            {
                _repo.SaveUser(user.User, user.Follows);
            }

            foreach (var tweet in _tweetReader.ReadAll())
            {
                _repo.SaveTweet(tweet);
            }

            _view.Display(_repo.FetchUserFeeds().OrderBy(uf => uf.User.ToString()));
        }