public void Reload() { IniData data; try { string iniPath = Environment.GetEnvironmentVariable("TWIGATEN_CONFIG_PATH"); if (string.IsNullOrWhiteSpace(iniPath)) { iniPath = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location), "twigaten.ini"); } var ini = new FileIniDataParser(); data = ini.ReadFile(iniPath); } catch { data = new IniData(); Console.WriteLine("FAILED TO LOAD config file."); } token = new _token(data); crawl = new _crawl(data); crawlparent = new _crawlparent(data); locker = new _locker(data); //hashはiniに書き込む必要がある hash = new _hash(data); dcthashserver = new _dcthashserver(data); web = new _web(data); database = new _database(data); }
public void Reload() { try { string iniPath = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location), "twiten.ini"); FileIniDataParser ini = new FileIniDataParser(); IniData data = ini.ReadFile(iniPath); token = new _token(data); crawl = new _crawl(data); crawlparent = new _crawlparent(data); locker = new _locker(data); hash = new _hash(iniPath, ini, data); database = new _database(data); } catch { } //twiviewではこのconfigクラスは使用しない }