private IActionResult ReadManga(StartReadAction pAction) { ArgumentsValidation.NotNull(pAction, "pAction"); var items = GetChildren(); if (items == null) { return new NotAvailableActionResult(); } var manga = pAction.Manga; var itemToActivate = items .OfType<MangaReaderManager>() .Where(x => x != null && x.Manga != null) .FirstOrDefault(x => x.Manga.Equals(manga)); var chapter = pAction.Chapter ?? ChapterInformation.DEFAULT; return itemToActivate == null ? StartReadingManga(manga, chapter) : StartReadingManga(manga, chapter, itemToActivate); }
private IActionResult StartRead(StartReadAction pStartReadAction) { ArgumentsValidation.NotNull(pStartReadAction, "pStartReadAction"); return DoStartRead(pStartReadAction.Chapter); }