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

InstallBundle() public method

public InstallBundle ( String location ) : IBundle
location String
return IBundle
        public IBundle InstallBundle(String location)
        {
            if (!ValidExtention(location))
            {
                location = location + BundleExtention[0];
            }

            string fullLocation = string.Empty;

            bool isPathRooted = Path.IsPathRooted(location);

            if (isPathRooted)
            {
                fullLocation = location;
            }

            if (!File.Exists(fullLocation))
            {
                throw new BundleException(String.Format("Bundle {0} not found.", location),
                    new FileNotFoundException(String.Format("file:{0} not found.", fullLocation)));
            }

            // Create the bundle object
            BundleData bundleData = new BundleData();
            bundleData.Id = bundleRepository.Count;
            bundleData.Location = fullLocation;

            Bundle bundle = new Bundle(bundleData, this);

            CheckInstallBundle(bundle);

            InstallBundleInternal(bundle);
            return bundle;
        }

Same methods

Framework::InstallBundle ( string location, BundleData bd ) : IBundle