Esempio n. 1
0
        public List <WallMessage> getWall(string userId)
        {
            var lines        = _idbHandler.ReadAllData();
            var wallMessages = new List <WallMessage>();

            foreach (var line in lines)
            {
                var message = JsonConvert.DeserializeObject <WallMessage>(line);

                if (message.UserId.Equals(userId))
                {
                    wallMessages.Add(message);
                }
            }
            return(wallMessages);
        }
Esempio n. 2
0
        public List <Follow> getFollowedList(string userId)
        {
            var lines      = _idbHandler.ReadAllData();
            var followList = new List <Follow>();

            foreach (var line in lines)
            {
                var message = JsonConvert.DeserializeObject <Follow>(line);

                if (message.FollowerId.Equals(userId))
                {
                    followList.Add(message);
                }
            }
            return(followList);
        }