//private const string RepoGuid = "65194810-1f85-11dd-bd0b-0800200c9a66"; public override async Task <InstallSetupResult> ExecuteAsync(Guid?starterKitId) { //if there is no value assigned then use the default starter kit if (starterKitId.HasValue == false) { var starterKits = _installHelper.GetStarterKits().FirstOrDefault(); if (starterKits != null) { starterKitId = starterKits.Id; } else { return(null); } } else if (starterKitId.Value == Guid.Empty) { //if the startkit id is an empty GUID then it means the user has decided not to install one // so we'll just exit return(null); } var(packageFile, packageId) = await DownloadPackageFilesAsync(starterKitId.Value); UmbracoApplication.Restart(); return(new InstallSetupResult(new Dictionary <string, object> { { "packageId", packageId }, { "packageFile", packageFile } })); }
public override InstallSetupResult Execute(Guid?starterKitId) { //if there is no value assigned then use the default starter kit if (starterKitId.HasValue == false) { var installHelper = new InstallHelper(UmbracoContext.Current); var starterKits = installHelper.GetStarterKits().FirstOrDefault(); if (starterKits != null) { starterKitId = starterKits.Id; } else { return(null); } } else if (starterKitId.Value == Guid.Empty) { //if the startkit id is an empty GUID then it means the user has decided not to install one // so we'll just exit return(null); } var result = DownloadPackageFiles(starterKitId.Value); _applicationContext.RestartApplicationPool(_httpContext); return(new InstallSetupResult(new Dictionary <string, object> { { "manifestId", result.Item2 }, { "packageFile", result.Item1 } })); }
public IEnumerable <Package> GetPackages() { var installHelper = new InstallHelper(UmbracoContext); var starterKits = installHelper.GetStarterKits(); return(starterKits); }