public IEnumerable <Issue> LoadIssuesForToday(int baseYear, uint daysPlayed) { var api = new CVApiClient(baseYear); var result = api.GetIssues(baseYear, daysPlayed); foreach (Issue issue in result) { if (!Issues.ContainsKey(issue.Id.ToString())) { Issues.Add(issue.Id.ToString(), issue); } } return(result); }
public Issue GetIssue(string id) { var api = new CVApiClient(-1); if (Issues.ContainsKey(id)) { return(Issues[id]); } else if (api.GetIssue(id) is Issue issue) { Issues.Add(issue.Id.ToString(), issue); return(issue); } return(null); }