protected virtual void Dispose(bool disposing) { if (disposing) { header = null; TOC.Clear(); if (_reader != null) { _reader.Dispose(); } if (_writer != null) { _writer.Dispose(); } } }
protected virtual void Dispose(bool disposing) { if (!disposing) { return; } _header = null; foreach (var entry in TOC.Where(entry => entry.Data != null)) { entry.Data.Dispose(); } TOC.Clear(); if (_reader != null) { _reader.Dispose(); } }
protected virtual void Dispose(bool disposing) { if (disposing) { header = null; foreach (var entry in TOC) { if (entry.Data != null) { entry.Data.Close(); } } TOC.Clear(); if (_reader != null) { _reader.Dispose(); } if (_writer != null) { _writer.Dispose(); } } }