public void Dispose() { if (this._FileStream != null) { try { this._FileStream.Dispose(); } catch (ObjectDisposedException ex) { } this._FileStream = (OutStreamWrapper)null; } if (this._FakeStream == null) { return; } try { this._FakeStream.Dispose(); } catch (ObjectDisposedException ex) { } this._FakeStream = (FakeOutStreamWrapper)null; }
private void Init(IInArchive archive, Stream stream, int filesCount, uint fileIndex, SevenZipExtractor extractor) { this._Archive = archive; this._FileStream = new OutStreamWrapper(stream, false); this._FileStream.BytesWritten += new EventHandler <IntEventArgs>(this.IntEventArgsHandler); this._FilesCount = filesCount; this._FileIndex = new uint?(fileIndex); this._FakeStream = new FakeOutStreamWrapper(); this._FakeStream.BytesWritten += new EventHandler <IntEventArgs>(this.IntEventArgsHandler); this._Extractor = extractor; }
private void Init(IInArchive archive, string directory, int filesCount, List <uint> actualIndexes, SevenZipExtractor extractor) { this._Archive = archive; this._Directory = directory; this._FilesCount = filesCount; this._ActualIndexes = actualIndexes; if (!directory.EndsWith(new string(Path.DirectorySeparatorChar, 1), StringComparison.CurrentCulture)) { this._Directory += (string)(object)Path.DirectorySeparatorChar; } this._FakeStream = new FakeOutStreamWrapper(); this._FakeStream.BytesWritten += new EventHandler <IntEventArgs>(this.IntEventArgsHandler); this._Extractor = extractor; }