Implementation of the command handler for recipes. Recipes now can execute commands.

--HG--
branch : recipe
This commit is contained in:
Suha Can
2011-02-17 12:32:41 -08:00
parent 36d37b859e
commit 80bc0a9df8
2 changed files with 161 additions and 9 deletions

View File

@@ -240,18 +240,12 @@ namespace Orchard.Setup.Services {
var cultureManager = environment.Resolve<ICultureManager>();
cultureManager.AddCulture("en-US");
var contentManager = environment.Resolve<IContentManager>();
// this needs to exit the standalone environment? rework this process entirely?
// simulate installation-time module activation events
//var hackInstallationGenerator = environment.Resolve<IHackInstallationGenerator>();
//hackInstallationGenerator.GenerateInstallEvents();
var recipeManager = environment.Resolve<IRecipeManager>();
if (context.Recipe != null) {
recipeManager.Execute(Recipes().Where(r => r.Name == context.Recipe).FirstOrDefault());
}
var contentManager = environment.Resolve<IContentManager>();
// If "Orchard.Widgets" is enabled, setup default layers and widgets
var extensionManager = environment.Resolve<IExtensionManager>();
var shellDescriptor = environment.Resolve<ShellDescriptor>();