From c2aebbae2a75e44236702cd28538a28625617dcd Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Sat, 23 Feb 2013 19:26:19 -0800 Subject: [PATCH] Fixing some IEventHandler registrations Some singletong services are not inside the BluePrint and are not recognized as IEventHandlers. The fix is just to manually named those registrations so that the Event Bus finds them. --HG-- branch : 1.x --- src/Orchard/Environment/OrchardStarter.cs | 4 ++-- .../Environment/ShellBuilders/ShellContainerFactory.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Orchard/Environment/OrchardStarter.cs b/src/Orchard/Environment/OrchardStarter.cs index 21d1166c5..79355f004 100644 --- a/src/Orchard/Environment/OrchardStarter.cs +++ b/src/Orchard/Environment/OrchardStarter.cs @@ -48,7 +48,7 @@ namespace Orchard.Environment { builder.RegisterType().As().SingleInstance(); builder.RegisterType().As().SingleInstance(); builder.RegisterType().As().SingleInstance(); - builder.RegisterType().As().SingleInstance(); + builder.RegisterType().As().Named(typeof(IShellSettingsManagerEventHandler).Name).SingleInstance(); builder.RegisterType().As().SingleInstance(); builder.RegisterType().As().SingleInstance(); builder.RegisterType().As().SingleInstance(); @@ -76,7 +76,7 @@ namespace Orchard.Environment { RegisterVolatileProvider(builder); - builder.RegisterType().As().As().SingleInstance(); + builder.RegisterType().As().As().Named(typeof(IShellSettingsManagerEventHandler).Name).SingleInstance(); { builder.RegisterType().As().SingleInstance(); diff --git a/src/Orchard/Environment/ShellBuilders/ShellContainerFactory.cs b/src/Orchard/Environment/ShellBuilders/ShellContainerFactory.cs index 8b36f8103..305f074f5 100644 --- a/src/Orchard/Environment/ShellBuilders/ShellContainerFactory.cs +++ b/src/Orchard/Environment/ShellBuilders/ShellContainerFactory.cs @@ -87,7 +87,7 @@ namespace Orchard.Environment.ShellBuilders { // register named instance for each interface, for efficient filtering inside event bus // IEventHandler derived classes only if (interfaceType.GetInterface(typeof (IEventHandler).Name) != null) { - registration = registration.Named(interfaceType.Name, typeof (IEventHandler)); + registration = registration.Named(interfaceType.Name); } } }