public Stream GetItemStream(SevenZipArchiveItem item) { base.Items = new Dictionary<uint, SevenZipArchiveItem>(); base.Items.Add(item.Index, item); this.CurrentStream = new ReadWriteStream(this); this.ConfirmExtractItem.Set(); ThreadPool.QueueUserWorkItem(new WaitCallback(this.ProcessExtract), new List<uint>(base.Items.Keys)); return this.CurrentStream; }
public int GetStream(uint index, out ISequentialOutStream outStream, AskMode askExtractMode) { outStream = null; if (askExtractMode == AskMode.kExtract) { this.CurrentItem = base.Items[index]; this.BeforeExtractItem.Set(); if (WaitHandle.WaitAny(new WaitHandle[] { this.ConfirmExtractItem, this.TerminateEvent }) != 0) { return -2147467260; } outStream = this.CurrentStream; } return 0; }