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