Inheritance: IDisposable
Esempio n. 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;
            }
        }
Esempio n. 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();
            }
        }
Esempio n. 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();
        }
Esempio n. 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;
            }
        }
Esempio n. 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;
            }
        }
Esempio n. 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();
        }