コード例 #1
0
        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
                           );
        }
コード例 #2
0
 public void Dispose()
 {
     if (Mst != null)
     {
         Mst.Dispose();
         Mst = null;
     }
     if (Xrf != null)
     {
         Xrf.Dispose();
         Xrf = null;
     }
     if (InvertedFile != null)
     {
         InvertedFile.Dispose();
         InvertedFile = null;
     }
 }
コード例 #3
0
 /// <inheritdoc cref="IDisposable.Dispose"/>
 public void Dispose()
 {
     Mst.Dispose();
     Xrf.Dispose();
     InvertedFile.Dispose();
 }