public static bool AddDriver(ConnectInfo info) { try { using (DbConnection connection = new SQLiteConnection(ConnectInfo.LocalConnectionString)) { connection.Open(); DbCommand command = connection.CreateCommand(); command.CommandText = Resources.InsertDriverScript; command.Parameters.Add(new SQLiteParameter("@name", info.DriverName)); command.Parameters.Add(new SQLiteParameter("@assemblyName", info.AssemblyName)); command.Parameters.Add(new SQLiteParameter("@namespaceName", info.NamespaceName)); command.Parameters.Add(new SQLiteParameter("@className", info.ClassName)); int ret = command.ExecuteNonQuery(); return(true); } } catch (Exception ex) { LogHelper.Error(ex); return(false); } }
public OpenConnectEventArgs(ConnectInfo info) : base() { this.info = info; }
public CloseConnectEventArgs(ConnectInfo info) : base() { this.info = info; }