wabbajack/SevenZipExtractor/ArchiveStreamCallback.cs
Timothy Baldridge 2d061bc1e4 Initial commit
2019-07-20 22:40:54 -06:00

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)
{
}
}
}