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