コード例 #1
0
 private void CommonInit(IInArchive archive, int filesCount, SevenZipExtractor extractor)
 {
     _archive    = archive;
     _filesCount = filesCount;
     _fakeStream = new FakeOutStreamWrapper();
     _fakeStream.BytesWritten += IntEventArgsHandler;
     _extractor = extractor;
     GC.AddMemoryPressure(MEMORY_PRESSURE);
 }
コード例 #2
0
        public void Dispose()
        {
            GC.RemoveMemoryPressure(MEMORY_PRESSURE);

            if (_fileStream != null)
            {
                try
                {
                    _fileStream.Dispose();
                }
                catch (ObjectDisposedException) { }
                _fileStream = null;
            }
            if (_fakeStream != null)
            {
                try
                {
                    _fakeStream.Dispose();
                }
                catch (ObjectDisposedException) { }
                _fakeStream = null;
            }
        }
コード例 #3
0
        private void CommonInit(IInArchive archive, int filesCount, SevenZipExtractor extractor)
        {
            _archive = archive;
            _filesCount = filesCount;
            _fakeStream = new FakeOutStreamWrapper();
            _fakeStream.BytesWritten += IntEventArgsHandler;
            _extractor = extractor;
#if !WINCE
            GC.AddMemoryPressure(MEMORY_PRESSURE);
#endif
        }
コード例 #4
0
 public void Dispose()
 {
     #if !WINCE
     GC.RemoveMemoryPressure(MEMORY_PRESSURE);
     #endif
     if (_fileStream != null)
     {
         try
         {
             _fileStream.Dispose();
         }
         catch (ObjectDisposedException) { }
         _fileStream = null;
     }
     if (_fakeStream != null)
     {
         try
         {
             _fakeStream.Dispose();
         }
         catch (ObjectDisposedException) { }
         _fakeStream = null;
     }
 }