Exemplo n.º 1
0
        public static async Task <EpubSchema> ReadSchemaAsync(ZipArchive epubArchive)
        {
            var result       = new EpubSchema();
            var rootFilePath = await RootFilePathReader.GetRootFilePathAsync(epubArchive).ConfigureAwait(false);

            var contentDirectoryPath = ZipPathUtils.GetDirectoryPath(rootFilePath);

            result.ContentDirectoryPath = contentDirectoryPath;
            EpubPackage package = await PackageReader.ReadPackageAsync(epubArchive, rootFilePath).ConfigureAwait(false);

            result.Package = package;
            return(result);
        }
Exemplo n.º 2
0
        public static async Task <EpubSchema> ReadSchemaAsync(ZipArchive epubArchive)
        {
            EpubSchema result       = new EpubSchema();
            string     rootFilePath = await RootFilePathReader.GetRootFilePathAsync(epubArchive).ConfigureAwait(false);

            string contentDirectoryPath = ZipPathUtils.GetDirectoryPath(rootFilePath);

            result.ContentDirectoryPath = contentDirectoryPath;
            EpubPackage package = await PackageReader.ReadPackageAsync(epubArchive, rootFilePath).ConfigureAwait(false);

            result.Package = package;
            EpubNavigation navigation = await NavigationReader.ReadNavigationAsync(epubArchive, contentDirectoryPath, package).ConfigureAwait(false);

            result.Navigation = navigation;
            return(result);
        }
Exemplo n.º 3
0
        public static async Task <EpubSchema> ReadSchemaAsync(ZipArchive epubArchive)
        {
            EpubSchema result       = new EpubSchema();
            string     rootFilePath = await RootFilePathReader.GetRootFilePathAsync(epubArchive).ConfigureAwait(false);

            string contentDirectoryPath = ZipPathUtils.GetDirectoryPath(rootFilePath);

            result.ContentDirectoryPath = contentDirectoryPath;
            EpubPackage package = await PackageReader.ReadPackageAsync(epubArchive, rootFilePath).ConfigureAwait(false);

            result.Package  = package;
            result.Epub2Ncx = await Epub2NcxReader.ReadEpub2NcxAsync(epubArchive, contentDirectoryPath, package).ConfigureAwait(false);

            result.Epub3NavDocument = await Epub3NavDocumentReader.ReadEpub3NavDocumentAsync(epubArchive, contentDirectoryPath, package).ConfigureAwait(false);

            return(result);
        }