public void OpenDb(string db, bool write) { var masterFile = Irbis64Config.LookupDbMst(db); Database = db; Database = Path.GetFileNameWithoutExtension(masterFile); if (Mst != null) { Mst.Dispose(); } if (Xrf != null) { Xrf.Dispose(); } if (InvertedFile != null) { InvertedFile.Dispose(); } Mst = new MstFile ( Path.ChangeExtension ( masterFile, ".mst" ), write ); Xrf = new XrfFile ( Path.ChangeExtension ( masterFile, ".xrf" ), write ); InvertedFile = new InvertedFile ( Path.ChangeExtension ( masterFile, ".ifp" ), write ); }
public void Dispose() { if (Mst != null) { Mst.Dispose(); Mst = null; } if (Xrf != null) { Xrf.Dispose(); Xrf = null; } if (InvertedFile != null) { InvertedFile.Dispose(); InvertedFile = null; } }
/// <inheritdoc cref="IDisposable.Dispose"/> public void Dispose() { Mst.Dispose(); Xrf.Dispose(); InvertedFile.Dispose(); }