Merge pull request #1141 from adamhathcock/copilot/sub-pr-1132

[WIP] Address feedback on async creation cleanup changes
This commit is contained in:
Adam Hathcock
2026-01-16 10:12:08 +00:00
committed by GitHub

View File

@@ -54,7 +54,7 @@ public class SevenZipFactory : Factory, IArchiveFactory, IMultiArchiveFactory
/// <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) =>
@@ -62,7 +62,7 @@ public class SevenZipFactory : Factory, IArchiveFactory, IMultiArchiveFactory
/// <inheritdoc/>
public IAsyncArchive OpenAsyncArchive(FileInfo fileInfo, ReaderOptions? readerOptions = null) =>
SevenZipArchive.LoadFactoryAsync(fileInfo, readerOptions);
SevenZipArchive.OpenAsyncArchive(fileInfo, readerOptions, CancellationToken.None);
#endregion
@@ -78,7 +78,7 @@ public class SevenZipFactory : Factory, IArchiveFactory, IMultiArchiveFactory
public IAsyncArchive OpenAsyncArchive(
IReadOnlyList<Stream> streams,
ReaderOptions? readerOptions = null
) => (IAsyncArchive)OpenArchive(streams, readerOptions);
) => SevenZipArchive.OpenAsyncArchive(streams, readerOptions, CancellationToken.None);
/// <inheritdoc/>
public IArchive OpenArchive(
@@ -91,11 +91,7 @@ public class SevenZipFactory : Factory, IArchiveFactory, IMultiArchiveFactory
IReadOnlyList<FileInfo> fileInfos,
ReaderOptions? readerOptions = null,
CancellationToken cancellationToken = default
)
{
cancellationToken.ThrowIfCancellationRequested();
return (IAsyncArchive)OpenArchive(fileInfos, readerOptions);
}
) => SevenZipArchive.OpenAsyncArchive(fileInfos, readerOptions, cancellationToken);
#endregion