internal void dispose(bool isDisposing) { if (Encoding != null) { // commit transaction if it is ongoing. if (Transaction != null) { if (!SystemFile.Profile.MemoryExtenderMode) { if (CommitOnDispose != null && CommitOnDispose.Value) { Transaction.Commit(); } else { Transaction.Rollback(); } } Transaction = null; } if (IsOpen) { if (!isDisposing) { if (_fileset is IInternalFileEntity) { ((IInternalFileEntity)_fileset).CloseStream(); } ((IInternalFileEntity)SystemFile).CloseStream(); } else { this.Close(); } } if (_fileset != null) { if (isDisposing) { _fileset.Dispose(); } this._fileset = null; } if (SystemFile != null) { if (isDisposing) { SystemFile.Dispose(); } this.SystemFile = null; } } }
internal void dispose(bool isDisposing) { if (Encoding != null) { if (IsOpen) { if (!isDisposing) { if (_fileset is IInternalFileEntity) { ((IInternalFileEntity)_fileset).CloseStream(); } ((IInternalFileEntity)SystemFile).CloseStream(); } else { this.Close(); } } if (_fileset != null) { if (isDisposing) { _fileset.Dispose(); } this._fileset = null; } if (SystemFile != null) { if (isDisposing) { SystemFile.Dispose(); } this.SystemFile = null; } } }