Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
Fixing other constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Crilly committed Oct 14, 2022
1 parent 5d9ed5e commit 55a52ed
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions SevenZip/SevenZipExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,24 +241,35 @@ public SevenZipExtractor(string archiveFullName, string password, InArchiveForma
/// <param name="archiveStream">The stream to read the archive from.</param>
/// <param name="password">Password for an encrypted archive.</param>
/// <remarks>The archive format is guessed by the signature.</remarks>
public SevenZipExtractor(Stream archiveStream, string password)
: base(password)
public SevenZipExtractor(Stream archiveStream, string password) : this(archiveStream, password, false)
{
}

/// <summary>
/// Initializes a new instance of SevenZipExtractor class.
/// </summary>
/// <param name="archiveStream">The stream to read the archive from.</param>
/// <param name="password">Password for an encrypted archive.</param>
/// <param name="leaveOpen">Leaves the base stream open.</param>
/// <remarks>The archive format is guessed by the signature.</remarks>
public SevenZipExtractor(Stream archiveStream, string password, bool leaveOpen) : this(archiveStream, password, leaveOpen, (InArchiveFormat)(-1))
{
Init(archiveStream);
}

/// <summary>
/// Initializes a new instance of SevenZipExtractor class.
/// </summary>
/// <param name="archiveStream">The stream to read the archive from.</param>
/// <param name="password">Password for an encrypted archive.</param>
/// <param name="leaveOpen">Leaves the base stream open.</param>
/// <param name="format">Manual archive format setup. You SHOULD NOT normally specify it this way.
/// Instead, use SevenZipExtractor(Stream archiveStream, string password), that constructor
/// automatically detects the archive format.</param>
public SevenZipExtractor(Stream archiveStream, string password, InArchiveFormat format)
public SevenZipExtractor(Stream archiveStream, string password, bool leaveOpen, InArchiveFormat format)
: base(password)
{
_format = format;
_leaveOpen = leaveOpen;
Init(archiveStream);
}

Expand Down

0 comments on commit 55a52ed

Please sign in to comment.