Inheritance: IDisposable
Example #1
0
        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;
            }
        }
Example #2
0
        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();
            }
        }
Example #3
0
        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();
        }
Example #4
0
        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;
            }
        }
Example #5
0
        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;
            }
        }
Example #6
0
        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();
        }