Formatted file.

This commit is contained in:
Sipke Schoorstra
2015-08-04 17:18:28 +01:00
parent 8cda6b54c6
commit de29f63521

View File

@@ -25,8 +25,7 @@ using Orchard.Security;
using Orchard.Settings;
using Orchard.Utility.Extensions;
namespace Orchard.Setup.Services
{
namespace Orchard.Setup.Services {
public class SetupService : ISetupService {
private readonly ShellSettings _shellSettings;
private readonly IOrchardHost _orchardHost;
@@ -71,7 +70,7 @@ namespace Orchard.Setup.Services
var recipes = new List<Recipe>();
foreach (var extension in _extensionManager.AvailableExtensions()) {
recipes.AddRange(_recipeHarvester.HarvestRecipes(extension.Id).Where(recipe => recipe.IsSetupRecipe));
recipes.AddRange(_recipeHarvester.HarvestRecipes(extension.Id).Where(recipe => recipe.IsSetupRecipe));
}
_recipes = recipes;
@@ -92,7 +91,7 @@ namespace Orchard.Setup.Services
// Core
"Common", "Containers", "Contents", "Dashboard", "Feeds", "Navigation","Scheduling", "Settings", "Shapes", "Title",
// Modules
"Orchard.Pages", "Orchard.ContentPicker", "Orchard.Themes", "Orchard.Users", "Orchard.Roles", "Orchard.Modules",
"Orchard.Pages", "Orchard.ContentPicker", "Orchard.Themes", "Orchard.Users", "Orchard.Roles", "Orchard.Modules",
"PackagingServices", "Orchard.Packaging", "Gallery", "Orchard.Recipes"
};
@@ -115,7 +114,7 @@ namespace Orchard.Setup.Services
shellSettings.HashAlgorithm = "HMACSHA256";
// randomly generated key
shellSettings.HashKey = HMAC.Create(shellSettings.HashAlgorithm).Key.ToHexString();
#endregion
var shellDescriptor = new ShellDescriptor {
@@ -168,7 +167,7 @@ namespace Orchard.Setup.Services
}
// in effect "pump messages" see PostMessage circa 1980
while ( _processingEngine.AreTasksPending() )
while (_processingEngine.AreTasksPending())
_processingEngine.ExecuteNextTask();
// creating a standalone environment.
@@ -188,7 +187,7 @@ namespace Orchard.Setup.Services
}
_shellSettingsManager.SaveSettings(shellSettings);
return executionId;
}
@@ -219,7 +218,7 @@ namespace Orchard.Setup.Services
var recipeManager = environment.Resolve<IRecipeManager>();
var recipe = Recipes().FirstOrDefault(r => r.Name.Equals(context.Recipe, StringComparison.OrdinalIgnoreCase));
if(recipe == null)
if (recipe == null)
throw new OrchardException(T("The recipe '{0}' could not be found.", context.Recipe));
var executionId = recipeManager.Execute(recipe);