private void AnalyzeArchive(string path) { // no archive handler == no analysis if (ArchiveHandlerFactory == null) { return; } int offset; bool isExecutable; if (NonArchiveExtensions.Any(ext => Path.GetExtension(path).Substring(1).ToLower() == ext.ToLower())) { return; } if (ArchiveHandlerFactory.CheckSignature(path, out offset, out isExecutable)) { _extractor = ArchiveHandlerFactory.Construct(path); try { ScanArchive(); _isArchive = true; } catch { _extractor.Dispose(); _extractor = null; _archiveItems = null; } } }
public void Dispose() { Unbind(); _extractor?.Dispose(); _rootStream?.Dispose(); _extractor = null; _rootStream = null; }
public void Dispose() { Unbind(); if (_extractor != null) { _extractor.Dispose(); } if (_rootStream != null) { _rootStream.Dispose(); } _extractor = null; _rootStream = null; }
private void AnalyzeArchive(string path) { // no archive handler == no analysis if (ArchiveHandlerFactory == null) { return; } int offset; bool isExecutable; if (NonArchiveExtensions.Any(ext => Path.GetExtension(path).Substring(1).ToLower() == ext.ToLower())) { return; } if (ArchiveHandlerFactory.CheckSignature(path, out offset, out isExecutable)) { _extractor = ArchiveHandlerFactory.Construct(path); try { ScanArchive(); } catch { _extractor.Dispose(); _extractor = null; _archiveItems = null; } } }