Пример #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         header = null;
         TOC.Clear();
         if (_reader != null)
         {
             _reader.Dispose();
         }
         if (_writer != null)
         {
             _writer.Dispose();
         }
     }
 }
Пример #2
0
        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();
            }
        }
Пример #3
0
 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();
         }
     }
 }