mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
|
using System.IO;
|
|||
|
|
|||
|
namespace SevenZipExtractor
|
|||
|
{
|
|||
|
internal class ArchiveStreamCallback : IArchiveExtractCallback
|
|||
|
{
|
|||
|
private readonly uint fileNumber;
|
|||
|
private readonly Stream stream;
|
|||
|
|
|||
|
public ArchiveStreamCallback(uint fileNumber, Stream stream)
|
|||
|
{
|
|||
|
this.fileNumber = fileNumber;
|
|||
|
this.stream = stream;
|
|||
|
}
|
|||
|
|
|||
|
public void SetTotal(ulong total)
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
public void SetCompleted(ref ulong completeValue)
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
public int GetStream(uint index, out ISequentialOutStream outStream, AskMode askExtractMode)
|
|||
|
{
|
|||
|
if ((index != this.fileNumber) || (askExtractMode != AskMode.kExtract))
|
|||
|
{
|
|||
|
outStream = null;
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
outStream = new OutStreamWrapper(this.stream);
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
public void PrepareOperation(AskMode askExtractMode)
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
public void SetOperationResult(OperationResult resultEOperationResult)
|
|||
|
{
|
|||
|
}
|
|||
|
}
|
|||
|
}
|