Exemplo 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);
        }
Exemplo 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);
        }