diff --git a/src/SharpCompress/Factories/SevenZipFactory.cs b/src/SharpCompress/Factories/SevenZipFactory.cs index 3a4ca345e..45149d7d2 100644 --- a/src/SharpCompress/Factories/SevenZipFactory.cs +++ b/src/SharpCompress/Factories/SevenZipFactory.cs @@ -54,7 +54,7 @@ public IArchive OpenArchive(Stream stream, ReaderOptions? readerOptions = null) /// public IAsyncArchive OpenAsyncArchive(Stream stream, ReaderOptions? readerOptions = null) => - SevenZipArchive.OpenAsyncArchive(stream, readerOptions); + SevenZipArchive.OpenAsyncArchive(stream, readerOptions, CancellationToken.None); /// public IArchive OpenArchive(FileInfo fileInfo, ReaderOptions? readerOptions = null) => @@ -62,7 +62,7 @@ public IArchive OpenArchive(FileInfo fileInfo, ReaderOptions? readerOptions = nu /// public IAsyncArchive OpenAsyncArchive(FileInfo fileInfo, ReaderOptions? readerOptions = null) => - SevenZipArchive.LoadFactoryAsync(fileInfo, readerOptions); + SevenZipArchive.OpenAsyncArchive(fileInfo, readerOptions, CancellationToken.None); #endregion @@ -78,7 +78,7 @@ public IArchive OpenArchive( public IAsyncArchive OpenAsyncArchive( IReadOnlyList streams, ReaderOptions? readerOptions = null - ) => (IAsyncArchive)OpenArchive(streams, readerOptions); + ) => SevenZipArchive.OpenAsyncArchive(streams, readerOptions, CancellationToken.None); /// public IArchive OpenArchive( @@ -91,11 +91,7 @@ public IAsyncArchive OpenAsyncArchive( IReadOnlyList fileInfos, ReaderOptions? readerOptions = null, CancellationToken cancellationToken = default - ) - { - cancellationToken.ThrowIfCancellationRequested(); - return (IAsyncArchive)OpenArchive(fileInfos, readerOptions); - } + ) => SevenZipArchive.OpenAsyncArchive(fileInfos, readerOptions, cancellationToken); #endregion