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; } }
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; } }