Inheritance: IDisposable
Ejemplo 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;
            }
        }
Ejemplo 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();
            }
        }
Ejemplo 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();
        }
Ejemplo 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;
            }
        }
Ejemplo 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;
            }
        }
Ejemplo 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();
        }