private static Tuple <int, bool, string> GetPointsForStory(StoryCollection stories, string challengeName) { var story = stories.FirstOrDefault(item => item.Id == challengeName); var points = 0; var isBonus = false; var uniqueTag = ""; if (story == null) { Console.WriteLine($"Cannot process story for challenge '{challengeName}'"); return(new Tuple <int, bool, string>(points, isBonus, uniqueTag)); } var pointsProperty = story.Properties.FirstOrDefault(item => item.Key == "effort"); if (!string.IsNullOrEmpty(pointsProperty.Key)) { int.TryParse(pointsProperty.Value, out points); } var isBonusProperty = story.Properties.FirstOrDefault(item => item.Key == "bonus"); if (!string.IsNullOrEmpty(pointsProperty.Key)) { bool.TryParse(isBonusProperty.Value, out isBonus); } var uniqueTagProperty = story.Properties.FirstOrDefault(item => item.Key == "code"); if (!string.IsNullOrEmpty(uniqueTagProperty.Key)) { uniqueTag = uniqueTagProperty.Value; } return(new Tuple <int, bool, string>(points, isBonus, uniqueTag)); }