public void Start(string bundleSymbolicName, BundleStartOptions option) { IBundle bundleBySymbolicName = Framework.GetBundleBySymbolicName(bundleSymbolicName); if (bundleBySymbolicName != null) { bundleBySymbolicName.Start(option); } }
public virtual void Start(BundleStartOptions option) { if ((Framework.StartLevelManager.StartLevel < GetBunldeStartLevel()) && (option == BundleStartOptions.Transient)) { throw new BundleException(string.Format(Messages.NotStartedSinceStartLevel, SymbolicName, Version)); } FileLogUtility.Debug(string.Format(Messages.BundleStarting, SymbolicName, Version)); DoLifecycleAction(() => DoStart(option), Messages.StartAction); FileLogUtility.Debug(string.Format(Messages.BundleInState, SymbolicName, Version, State)); }
protected override void DoStart(BundleStartOptions option) { if (((base.State != BundleState.Starting) && (base.State != BundleState.Stopping)) && !base.IsActive) { if (!base.IsResolved) { base.Framework.FrameworkAdaptor.State.Resolve(); if (!base.IsResolved) { throw new BundleException($"The bundle '{base.SymbolicName}, {base.Version}' is started failed since it can not be resolved."); } } if (LicenseService.RequireBundleLicenseValidation) { try { LicenseService.ValidateBundleLicense(base.BundleData, true); } catch (Exception exception) { FileLogUtility.Error(exception); return; } } if ((base.BundleData.Activator == null) || (base.BundleData.Activator.Policy != ActivatorPolicy.Lazy)) { base.State = BundleState.Starting; if (option != BundleStartOptions.Transient) { BundlePersistentData persistentData = this.GetPersistentData(); if ((persistentData != null) && (persistentData.State == BundleState.Active)) { this.CallTryStart(); return; } } this.CallTryStart(); if (option != BundleStartOptions.Transient) { this.SavePersistent(); } } else if (base.State != BundleState.Starting) { base.State = BundleState.Starting; base.Framework.EventManager.DispatchBundleLazyActivateEvent(this, new BundleLazyActivatedEventArgs(this)); } } }
protected override void DoStart(BundleStartOptions option) { Stopwatch stopwatch = new Stopwatch(); try { if (((base.State != BundleState.Active) && (base.State != BundleState.Starting)) && (base.State != BundleState.Stopping)) { stopwatch.Start(); base.State = BundleState.Starting; if (base.Context == null) { base.Context = this.CreateBundleContext(); } base.Framework.StartLevelManager.ChangeStartLevel(base.Framework.StartLevelManager.StartLevel); base.State = BundleState.Active; } } finally { stopwatch.Stop(); FileLogUtility.Verbose(string.Format(Messages.StartSystemBundleTimeCounter, stopwatch.ElapsedMilliseconds)); } }
protected override void DoStart(BundleStartOptions option) { throw new BundleException(Messages.FragmentBundleCanNotBeStarted); }
protected abstract void DoStart(BundleStartOptions option);