public EmbeddedStorage(string path) { _compoundFile = new CompoundFile(path, new CompoundFile.CompoundFileOptions{ FlushAtWrite = true, UseWriteCache = false }); _toc = new Toc(); if (!InitializeToc()) { if (!AllocateToc()) { throw new Exception("Catastrophic failure. Could not allocate TOC."); } } }
private void Dispose(bool disposing) { if (!disposing) return; if (_disposed) return; _disposed = true; if (_compoundFile != null) { lock (_sync) { _compoundFile.Dispose(); _compoundFile = null; } } }