static void BuildDataBase(string dataFolder, IHashMaker hashMaker, string dataBaseFile, bool shutDown) { if (!Directory.Exists(dataFolder)) { WriteLog(string.Format("'{0}' doesn't exist! ", dataFolder)); return; } DataBase dataBase = new DataBase(hashMaker); dataBase.BuildDataBase(dataFolder); dataBase.SaveInBinary(dataBaseFile); if (shutDown) Utility.ShutDown(); }
public static void ConvertIndexFileFromTextToBinary(string textFile, string binaryFile, IHashMaker hashMaker) { DataBase dataBase = new DataBase(hashMaker); dataBase.Load(textFile); dataBase.SaveInBinary(binaryFile); }