在运行时在果园中使用我的一些命令制作对象
make object using Some of my command at runtime in orchard in
我有一些命令,我在 Orchard 中由最终用户(管理界面)执行了几次,
我知道什么是 Recipe 和 Orchard.exe!
但我想通过管理界面执行我的命令!
非常感谢!
您可以随时将食谱上传到管理员 UI 查看此处:Orchard Recipes and here
有些模块曾经启用 运行 个配方。
并查看源代码,但这里有一些代码
Recipe recipe = _recipeHarvester.HarvestRecipes(module.Descriptor.Id).FirstOrDefault(x => !x.IsSetupRecipe && x.Name == name);
if (recipe == null) {
return HttpNotFound();
}
try {
_recipeManager.Execute(recipe);
}
catch(Exception e) {
Logger.Error(e, "Error while executing recipe {0} in {1}", moduleId, name);
Services.Notifier.Error(T("Recipes contains {0} unsupported module installation steps.", recipe.Name));
}
我有一些命令,我在 Orchard 中由最终用户(管理界面)执行了几次,
我知道什么是 Recipe 和 Orchard.exe!
但我想通过管理界面执行我的命令!
非常感谢!
您可以随时将食谱上传到管理员 UI 查看此处:Orchard Recipes and here 有些模块曾经启用 运行 个配方。
并查看源代码,但这里有一些代码
Recipe recipe = _recipeHarvester.HarvestRecipes(module.Descriptor.Id).FirstOrDefault(x => !x.IsSetupRecipe && x.Name == name);
if (recipe == null) {
return HttpNotFound();
}
try {
_recipeManager.Execute(recipe);
}
catch(Exception e) {
Logger.Error(e, "Error while executing recipe {0} in {1}", moduleId, name);
Services.Notifier.Error(T("Recipes contains {0} unsupported module installation steps.", recipe.Name));
}