PluginFramework.AddIn.Core.Framework.StopBundle C# (CSharp) Method

StopBundle() public method

public StopBundle ( int id ) : void
id int
return void
        public void StopBundle(int id)
        {
            IBundle bundle = bundleRepository.GetBundle(id);
            if (bundle == null)
            {
                throw new BundleException(
                    String.Format("Bundle not found.BundleId:{0}", id));
            }
            if (bundle.State != BundleState.Active)
            {
                throw new BundleException("Bundle is not active.");
            }
            bundle.Stop();
        }