public void AddToExistingChapter(String chapterURL, MangaPage mangaPage) { if (this.chapters.ContainsKey(chapterURL)) { this.chapters[chapterURL].TryAddPage(mangaPage); } }
public void TryAddPage(MangaPage currPage) { if (this.ContainsPagesForChapter(currPage.chapterURL)) { this.pages[currPage.chapterURL].Add(currPage); } else { this.pages.Add(currPage.chapterURL, new List <MangaPage>()); this.pages[currPage.chapterURL].Add(currPage); } }