Exemple #1
0
Fichier : GA.cs Projet : Overx/AI
 public void Save(string fileName)
 {
     ThreadPool.QueueUserWorkItem(new WaitCallback((p) =>
     {
         try
         {
             IRepository <GAParams> repository = new GARepository((string)p);
             repository.Add(GAParams);
             repository.SaveChanges();
         }
         catch
         {
         }
     }), fileName);
 }
Exemple #2
0
 public void Save(string fileName)
 {
     ThreadPool.QueueUserWorkItem(new WaitCallback((p) =>
     {
         try
         {
             IRepository<GAParams> repository = new GARepository((string)p);
             repository.Add(GAParams);
             repository.SaveChanges();
         }
         catch
         {
         }
     }), fileName);
 }