Example #1
0
 private void PrivateBoot()
 {
     try
     {
         Application app = (Application)Inception.CreateInstanceAndUnwrap("Framework", "Dover.Framework.Application");
         SAPServiceFactory.PrepareForInception(Inception); // need to be after Application creation because of assembly resolving from embedded resources.
         Inception.SetData("assemblyName", "Framework");   // Used to get current AssemblyName for logging and reflection
         InceptionAddinManager = app.Resolve <AddinManager>();
         Sponsor <Application>  appSponsor          = new Sponsor <Application>(app);
         Sponsor <AddinManager> addInManagerSponsor = new Sponsor <AddinManager>(InceptionAddinManager);
         app.RunInception();
         AppDomain.Unload(Inception); // release AppDomain on shutdown.
     }
     catch (Exception e)
     {
         System.Windows.Forms.MessageBox.Show(string.Format("{0}\n{1}", e.Message, e.StackTrace));
         throw e;
     }
 }