예제 #1
0
        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);
        }
예제 #2
0
        private IActionResult StartRead(StartReadAction pStartReadAction)
        {
            ArgumentsValidation.NotNull(pStartReadAction, "pStartReadAction");

            return DoStartRead(pStartReadAction.Chapter);
        }