mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
@@ -67,8 +67,8 @@ namespace Orchard.Setup.Services {
|
|||||||
|
|
||||||
public string Setup(SetupContext context) {
|
public string Setup(SetupContext context) {
|
||||||
string executionId = null;
|
string executionId = null;
|
||||||
|
|
||||||
// The vanilla Orchard distibution has the following features enabled.
|
// The vanilla Orchard distibution has the following features enabled.
|
||||||
if (context.EnabledFeatures == null || context.EnabledFeatures.Count() == 0) {
|
|
||||||
string[] hardcoded = {
|
string[] hardcoded = {
|
||||||
// Framework
|
// Framework
|
||||||
"Orchard.Framework",
|
"Orchard.Framework",
|
||||||
@@ -79,7 +79,8 @@ namespace Orchard.Setup.Services {
|
|||||||
"PackagingServices", "Orchard.Packaging", "Gallery", "Orchard.Recipes",
|
"PackagingServices", "Orchard.Packaging", "Gallery", "Orchard.Recipes",
|
||||||
};
|
};
|
||||||
|
|
||||||
context.EnabledFeatures = hardcoded;
|
if (context.EnabledFeatures != null) {
|
||||||
|
context.EnabledFeatures = hardcoded.Union(context.EnabledFeatures).Distinct();
|
||||||
}
|
}
|
||||||
|
|
||||||
var shellSettings = new ShellSettings(_shellSettings);
|
var shellSettings = new ShellSettings(_shellSettings);
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ namespace Orchard.Setup {
|
|||||||
builder.RegisterType<DataServicesProviderFactory>().As<IDataServicesProviderFactory>().InstancePerLifetimeScope();
|
builder.RegisterType<DataServicesProviderFactory>().As<IDataServicesProviderFactory>().InstancePerLifetimeScope();
|
||||||
builder.RegisterType<DefaultCommandManager>().As<ICommandManager>().InstancePerLifetimeScope();
|
builder.RegisterType<DefaultCommandManager>().As<ICommandManager>().InstancePerLifetimeScope();
|
||||||
builder.RegisterType<HelpCommand>().As<ICommandHandler>().InstancePerLifetimeScope();
|
builder.RegisterType<HelpCommand>().As<ICommandHandler>().InstancePerLifetimeScope();
|
||||||
builder.RegisterType<WorkContextAccessor>().As<IWorkContextAccessor>().InstancePerMatchingLifetimeScope("shell");
|
//builder.RegisterType<WorkContextAccessor>().As<IWorkContextAccessor>().InstancePerMatchingLifetimeScope("shell");
|
||||||
builder.RegisterType<ResourceManager>().As<IResourceManager>().InstancePerLifetimeScope();
|
builder.RegisterType<ResourceManager>().As<IResourceManager>().InstancePerLifetimeScope();
|
||||||
builder.RegisterType<ResourceFilter>().As<IFilterProvider>().InstancePerLifetimeScope();
|
builder.RegisterType<ResourceFilter>().As<IFilterProvider>().InstancePerLifetimeScope();
|
||||||
builder.RegisterType<DefaultOrchardShell>().As<IOrchardShell>().InstancePerMatchingLifetimeScope("shell");
|
builder.RegisterType<DefaultOrchardShell>().As<IOrchardShell>().InstancePerMatchingLifetimeScope("shell");
|
||||||
|
|||||||
Reference in New Issue
Block a user