/// <summary> /// Return all config options /// </summary> /// <param name="getDefault">Include default config values if they not exists in the server config</param> /// <param name="cache"></param> /// <returns>Dictionary enumeration of config key-value</returns> public SerializableDictionary <string, string> GetAllConf(bool getDefault, bool cache = false) { // update cache if (!cache || _isNewConfig) { _isNewConfig = false; // clear _entity.Config.Clear(); // add foreach (var c in _server.getAllConf()) { if (c.Key == "port") { _entity.Port = int.Parse(c.Value); } _entity.Config.Add(c.Key, c.Value); } if (getDefault) { // iterate default config foreach (var c in _instance.GetDefaultConf()) { // if option not exists in server config then add it if (!_entity.Config.ContainsKey(c.Key)) { _entity.Config.Add(c.Key, c.Value); } } } } return(_entity.Config); }