Exemple #1
0
 public void stop(int options)
 {
     if (this.state == Bundle_Const.ACTIVE)
     {
         this.state = Bundle_Const.STOPPING;
         if (bundleActivator != null)
         {
             framework.fireBundleEvent(new BundleEvent(BundleEvent.STOPPING, this));
             bundleActivator.stop(bundleContext);
             bundleContext.stop();
             unloadAssemblyLoadContext();
             framework.fireBundleEvent(new BundleEvent(BundleEvent.STOPPED, this));
             bundleActivator = null;
         }
         this.state = Bundle_Const.RESOLVED;
     }
 }
Exemple #2
0
 public void stop(int options)
 {
     if (this.state == Bundle_Const.ACTIVE)
     {
         this.state = Bundle_Const.STOPPING;
         if (bundleActivator != null)
         {
             framework.fireBundleEvent(new BundleEvent(BundleEvent.STOPPING, this));
             bundleActivator.stop(bundleContext);
             bundleContext.stop();
             if (framework.IsUseAppDomain())
             {
                 unloadAppDomain();
             }
             framework.fireBundleEvent(new BundleEvent(BundleEvent.STOPPED, this));
             bundleActivator = null;
         }
         this.state = Bundle_Const.RESOLVED;
     }
 }