/// <summary> /// Initializes a new instance of the <see cref="ServerDatabaseSettings"/> class. /// </summary> /// <param name="dbClient">The database client.</param> internal ServerDatabaseSettings(IRegularQueryAdapter dbClient) { DbData = new Dictionary<string, string>(); DbData.Clear(); dbClient.SetQuery("SELECT * FROM server_settings"); DataTable table = dbClient.GetTable(); foreach (DataRow dataRow in table.Rows) DbData.Add(dataRow[0].ToString(), dataRow[1].ToString()); }
/// <summary> /// Initializes a new instance of the <see cref="ServerDatabaseSettings"/> class. /// </summary> /// <param name="dbClient">The database client.</param> internal ServerDatabaseSettings(IRegularQueryAdapter dbClient) { DbData = new Dictionary <string, string>(); DbData.Clear(); dbClient.SetQuery("SELECT * FROM server_settings"); DataTable table = dbClient.GetTable(); foreach (DataRow dataRow in table.Rows) { DbData.Add(dataRow[0].ToString(), dataRow[1].ToString()); } }
/// <summary> /// Initializes a new instance of the <see cref="ConfigData"/> class. /// </summary> /// <param name="dbClient">The database client.</param> internal ConfigData(IRegularQueryAdapter dbClient) { try { DbData = new Dictionary<string, string>(); DbData.Clear(); dbClient.SetQuery("SELECT * FROM server_settings"); var table = dbClient.GetTable(); foreach (DataRow dataRow in table.Rows) DbData.Add(dataRow[0].ToString(), dataRow[1].ToString()); } catch { } }
/// <summary> /// Initializes a new instance of the <see cref="ConfigData"/> class. /// </summary> /// <param name="dbClient">The database client.</param> internal ConfigData(IRegularQueryAdapter dbClient) { try { DbData = new Dictionary <string, string>(); DbData.Clear(); dbClient.SetQuery("SELECT * FROM `server_settings`"); var table = dbClient.GetTable(); foreach (DataRow dataRow in table.Rows) { DbData.Add(dataRow[0].ToString(), dataRow[1].ToString()); } } catch { } }