Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions src/SharpCompress/Factories/SevenZipFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ public IArchive OpenArchive(Stream stream, ReaderOptions? readerOptions = null)

/// <inheritdoc/>
public IAsyncArchive OpenAsyncArchive(Stream stream, ReaderOptions? readerOptions = null) =>
SevenZipArchive.OpenAsyncArchive(stream, readerOptions);
SevenZipArchive.OpenAsyncArchive(stream, readerOptions, CancellationToken.None);

/// <inheritdoc/>
public IArchive OpenArchive(FileInfo fileInfo, ReaderOptions? readerOptions = null) =>
SevenZipArchive.OpenArchive(fileInfo, readerOptions);

/// <inheritdoc/>
public IAsyncArchive OpenAsyncArchive(FileInfo fileInfo, ReaderOptions? readerOptions = null) =>
SevenZipArchive.LoadFactoryAsync(fileInfo, readerOptions);
SevenZipArchive.OpenAsyncArchive(fileInfo, readerOptions, CancellationToken.None);

#endregion

Expand All @@ -78,7 +78,7 @@ public IArchive OpenArchive(
public IAsyncArchive OpenAsyncArchive(
IReadOnlyList<Stream> streams,
ReaderOptions? readerOptions = null
) => (IAsyncArchive)OpenArchive(streams, readerOptions);
) => SevenZipArchive.OpenAsyncArchive(streams, readerOptions, CancellationToken.None);

/// <inheritdoc/>
public IArchive OpenArchive(
Expand All @@ -91,11 +91,7 @@ public IAsyncArchive OpenAsyncArchive(
IReadOnlyList<FileInfo> fileInfos,
ReaderOptions? readerOptions = null,
CancellationToken cancellationToken = default
)
{
cancellationToken.ThrowIfCancellationRequested();
return (IAsyncArchive)OpenArchive(fileInfos, readerOptions);
}
) => SevenZipArchive.OpenAsyncArchive(fileInfos, readerOptions, cancellationToken);

#endregion

Expand Down