mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing ComponentNotRegisteredException during setup, fixes #4159
Added fix by jtkech.
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user