예제 #1
0
 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);
     }
 }
예제 #2
0
 public OpenConnectEventArgs(ConnectInfo info)
     :
     base()
 {
     this.info = info;
 }
예제 #3
0
 public CloseConnectEventArgs(ConnectInfo info)
     :
     base()
 {
     this.info = info;
 }