public void Setup() { IEnumerable <string> enabledFeatures = null; if (!string.IsNullOrEmpty(EnabledFeatures)) { enabledFeatures = EnabledFeatures .Split(',') .Select(s => s.Trim()) .Where(s => !string.IsNullOrEmpty(s)); } Recipe = String.IsNullOrEmpty(Recipe) ? "Default" : Recipe; var setupContext = new SetupContext { SiteName = SiteName, AdminUsername = AdminUsername, AdminPassword = AdminPassword, DatabaseProvider = DatabaseProvider, DatabaseConnectionString = DatabaseConnectionString, DatabaseTablePrefix = DatabaseTablePrefix, EnabledFeatures = enabledFeatures, Recipe = Recipe, }; _setupService.Setup(setupContext); Context.Output.WriteLine(T("Site \"{0}\" successfully setup to run data provider \"{1}\" (with table prefix \"{2}\") and configured by recipe \"{3}\"", setupContext.SiteName, setupContext.DatabaseProvider, setupContext.DatabaseTablePrefix, setupContext.Recipe)); }
public void Setup() { IEnumerable <string> enabledFeatures = null; if (!String.IsNullOrEmpty(EnabledFeatures)) { enabledFeatures = EnabledFeatures .Split(',') .Select(s => s.Trim()) .Where(s => !String.IsNullOrEmpty(s)); } Recipe = String.IsNullOrEmpty(Recipe) ? "Default" : Recipe; var setupContext = new SetupContext { SiteName = SiteName, AdminUsername = AdminUsername, AdminPassword = AdminPassword, DatabaseProvider = DatabaseProvider, DatabaseConnectionString = DatabaseConnectionString, DatabaseTablePrefix = DatabaseTablePrefix, EnabledFeatures = enabledFeatures, Recipe = Recipe, }; var executionId = _setupService.Setup(setupContext); Context.Output.WriteLine(T("Setup of site '{0}' was started with recipe execution ID {1}. Use the 'recipes result' command to check the result of the execution.", setupContext.SiteName, executionId)); }