public IBundle StartBundle(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.Installed)
{
throw new BundleException("Bundle is aready started.");
}
bundle.Start();
return bundle;
}