コード例 #1
0
ファイル: Util.cs プロジェクト: hazzik/NHibernate.Burrow
 public static void ResetEnvironment()
 {
     SchemaUtil su = new SchemaUtil();
     su.CreateSchemas();
     BurrowFramework f = new BurrowFramework();
     f.CloseWorkSpace();
     f.BurrowEnvironment.ShutDown(); //Restart the environment to prepare a fresh start 
     f.BurrowEnvironment.Start();
     Checker.CheckSpanningConversations(0);
     f.InitWorkSpace();
 }
コード例 #2
0
 protected override void Perform()
 {
     pt = new ProgressTracker();
     BurrowFramework bf = new BurrowFramework();
     bf.InitWorkSpace();
     try {
         pt.ProgressChanged += new EventHandler(pt_ProgressChanged);
         DoPerform();
     }catch(Exception) {
         try {
             if (bf.CurrentConversation != null)
                 bf.CurrentConversation.GiveUp();
         }catch (Exception) {/*prevent this exception hiding the real one*/}
         throw;
     }
     finally {
         try {
             bf.CloseWorkSpace();
         }
         catch (Exception) {/*prevent this exception hiding the real one*/}
     }
 }