コード例 #1
0
        public ICollection <Users> GetUsers()
        {
            var result = new List <Users>();

            var usrs      = _textfile.GetData(_connectionstring);
            var userModel = BindUserModel(usrs);


            if (userModel == null)
            {
                return(result);
            }


            result = GetUsersWithFollowers(userModel);


            var doNotFollowAnyone = GetUsersThatDoNotFollowAnyone(userModel, result);

            foreach (var userId in doNotFollowAnyone)
            {
                result.Add(new Users()
                {
                    UserId = userId, Follows = new List <string>()
                });
            }


            return(result);
        }
コード例 #2
0
        public IEnumerable <Tweet> GetTweets()
        {
            var tweets = _textfile.GetData(_connectionstring);

            return(_tweetProcess.GetTweets(tweets));
        }