public Liteloaderversion GetInfo(String md5) { String sql = String.Format("SELECT * FROM {0} WHERE md5 LIKE '{1}';", TableName, md5); Liteloaderversion llversion = new Liteloaderversion(); if (IsUnix()) { using (SqliteConnection db = new SqliteConnection(ConnectionString)) { db.Open(); using (SqliteCommand cmd = new SqliteCommand(sql, db)) { using (SqliteDataReader reader = cmd.ExecuteReader()) { while (reader.Read()) { llversion.Md5 = reader["md5"].ToString(); llversion.Mcversion = reader["mcversion"].ToString(); llversion.Version = reader["version"].ToString(); llversion.File = reader["file"].ToString(); llversion.TweakClass = reader["tweakClass"].ToString(); } return(llversion); } } } } using (SQLiteConnection db = new SQLiteConnection(ConnectionString)) { db.Open(); using (SQLiteCommand cmd = new SQLiteCommand(sql, db)) { using (SQLiteDataReader reader = cmd.ExecuteReader()) { while (reader.Read()) { llversion.Md5 = reader["md5"].ToString(); llversion.Mcversion = reader["mcversion"].ToString(); llversion.Version = reader["version"].ToString(); llversion.File = reader["file"].ToString(); llversion.TweakClass = reader["tweakClass"].ToString(); } return(llversion); } } } }
public Liteloaderversion GetInfo(String md5) { String sql = String.Format("SELECT * FROM {0} WHERE md5 LIKE '{1}';", TableName, md5); Liteloaderversion llversion = new Liteloaderversion(); if (IsUnix()) { using (SqliteConnection db = new SqliteConnection(ConnectionString)) { db.Open(); using (SqliteCommand cmd = new SqliteCommand(sql, db)) { using (SqliteDataReader reader = cmd.ExecuteReader()) { while (reader.Read()) { llversion.Md5 = reader["md5"].ToString(); llversion.Mcversion = reader["mcversion"].ToString(); llversion.Version = reader["version"].ToString(); llversion.File = reader["file"].ToString(); llversion.TweakClass = reader["tweakClass"].ToString(); } return llversion; } } } } using (SQLiteConnection db = new SQLiteConnection(ConnectionString)) { db.Open(); using (SQLiteCommand cmd = new SQLiteCommand(sql, db)) { using (SQLiteDataReader reader = cmd.ExecuteReader()) { while (reader.Read()) { llversion.Md5 = reader["md5"].ToString(); llversion.Mcversion = reader["mcversion"].ToString(); llversion.Version = reader["version"].ToString(); llversion.File = reader["file"].ToString(); llversion.TweakClass = reader["tweakClass"].ToString(); } return llversion; } } } }