Fixing ComponentNotRegisteredException during setup, fixes #4159

Added fix by jtkech.
This commit is contained in:
Lombiq
2015-05-31 18:15:29 +02:00
parent ee0bd03c04
commit 917fd8425f

View File

@@ -67,6 +67,7 @@ namespace Orchard.Setup {
builder.RegisterType<ResourceFilter>().As<IFilterProvider>().InstancePerLifetimeScope();
builder.RegisterType<DefaultOrchardShell>().As<IOrchardShell>().InstancePerMatchingLifetimeScope("shell");
builder.RegisterType<SweepGenerator>().As<ISweepGenerator>().SingleInstance();
builder.RegisterType<SetupBackgroundService>().As<IBackgroundService>().InstancePerLifetimeScope();
// setup mode specific implementations of needed service interfaces
builder.RegisterType<SafeModeThemeService>().As<IThemeManager>().InstancePerLifetimeScope();
@@ -101,6 +102,12 @@ namespace Orchard.Setup {
}
internal class SetupBackgroundService : IBackgroundService {
public void Sweep() {
// Don't run any background service in setup mode.
}
}
[UsedImplicitly]
class SafeModeText : IText {
public LocalizedString Get(string textHint, params object[] args) {