private void Dispose(bool disposing) { // Check to see if Dispose has already been called. if (!this.disposed) { if (disposing) { if (m_xmlReader != null) { ((IDisposable)m_xmlReader).Dispose(); } if (m_sheetStream != null) { m_sheetStream.Dispose(); } if (m_zipWorker != null) { m_zipWorker.Dispose(); } } m_zipWorker = null; m_xmlReader = null; m_sheetStream = null; m_workbook = null; m_cellsValues = null; m_savedCellsValues = null; disposed = true; } }
public void Initialize(Stream fileStream) { m_zipWorker = new ZipWorker(); m_zipWorker.Extract(fileStream); if (!m_zipWorker.IsValid) { m_isValid = false; m_exceptionMessage = m_zipWorker.ExceptionMessage; Dispose(); } else { m_isValid = true; ReadGlobals(); } }
public void Initialize(System.IO.Stream fileStream) { m_zipWorker = new ZipWorker(); m_zipWorker.Extract(fileStream); if (!m_zipWorker.IsValid) { m_isValid = false; m_exceptionMessage = m_zipWorker.ExceptionMessage; Close(); return; } ReadGlobals(); }
public void Close() { if (IsClosed) { return; } m_isClosed = true; if (m_xmlReader != null) { m_xmlReader.Close(); m_xmlReader = null; } if (m_sheetStream != null) { m_sheetStream.Close(); m_sheetStream = null; } if (m_zipWorker != null) { m_zipWorker.Dispose(); m_zipWorker = null; } }
private void Dispose(bool disposing) { // Check to see if Dispose has already been called. if (!disposed) { if (disposing) { if (m_xmlReader != null) ((IDisposable)m_xmlReader).Dispose(); if (m_sheetStream != null) m_sheetStream.Dispose(); if (m_zipWorker != null) m_zipWorker.Dispose(); } m_zipWorker = null; m_xmlReader = null; m_sheetStream = null; m_workbook = null; m_cellsValues = null; m_savedCellsValues = null; disposed = true; } }