protected void _init(string path, string filename = "config.json") { this._data = new ConfigData(); path = DirectoryHandler.ValidateDirectoryPath(path); if (!DirectoryHandler.Exists(path)) { throw new ConfigDirectoryNotFound(path); } if (FileHandler.Exists(path + filename)) { this._path = path + filename; this.LoadFromFile(path + filename); } else { this._data.Path = path; this._path = path + filename; using (FileHandler fHandler = new FileHandler(this._path)) { fHandler.Serializer.WriteJson(this._data); } } }
protected void _init() { if (!DirectoryHandler.Exists(this._config.TablesDirectory)) { new DirectoryHandler(this._config.TablesDirectory); } this._loadTables(); }