Пример #1
0
 private async Task StoreChapterObject(MangaObject MangaObject, ChapterObject ChapterObject)
 {
     await CORE.ZipManager.WriteAsync(
         SavePath(MangaObject, ChapterObject),
         ChapterObject.GetType().Name,
         ChapterObject.Serialize(SerializeType: SerializeType)
         ).Retry(FILE_ACCESS_TIMEOUT, DEFAULT_DELAY, DELAY_INCREMENT);
 }
Пример #2
0
        private async Task <ChapterObject> StorePageObject(MangaObject MangaObject, ChapterObject ChapterObject, PageObject PageObject)
        {
            Int32 index = ChapterObject.Pages.FindIndex(_PageObject => Equals(_PageObject.PageNumber, PageObject.PageNumber));

            ChapterObject.Pages[index] = PageObject;
            // Save the ChapterObject via Async to Save Path with Retry and Timeout of 30min
            await CORE.ZipManager.WriteAsync(
                SavePath(MangaObject, ChapterObject),
                ChapterObject.GetType().Name,
                ChapterObject.Serialize(SerializeType: SerializeType)
                ).Retry(FILE_ACCESS_TIMEOUT, DEFAULT_DELAY, DELAY_INCREMENT);

            return(ChapterObject);
        }