#19476: Event bus refactoring. Interface name matching should be case-sensitive.

Work Item: 19476

--HG--
branch : 1.x
This commit is contained in:
Piotr Szmyd
2013-02-23 05:39:01 +01:00
parent b04d9ffb32
commit 5bd459a68c
3 changed files with 11 additions and 11 deletions

View File

@@ -22,13 +22,13 @@ namespace Orchard.Tests.Events {
builder.RegisterType<StubExceptionPolicy>().As<IExceptionPolicy>();
builder.RegisterType<StubEventHandler2>()
.Named(typeof(ITestEventHandler).Name.ToLowerInvariant(), typeof(IEventHandler))
.Named(typeof(IEventHandler).Name.ToLowerInvariant(), typeof(IEventHandler))
.WithMetadata("Interfaces", typeof(StubEventHandler2).GetInterfaces().ToLookup(i => i.Name, StringComparer.OrdinalIgnoreCase));
.Named(typeof(ITestEventHandler).Name, typeof(IEventHandler))
.Named(typeof(IEventHandler).Name, typeof(IEventHandler))
.WithMetadata("Interfaces", typeof(StubEventHandler2).GetInterfaces().ToLookup(i => i.Name));
builder.RegisterInstance(_eventHandler)
.Named(typeof(ITestEventHandler).Name.ToLowerInvariant(), typeof(IEventHandler))
.Named(typeof(IEventHandler).Name.ToLowerInvariant(), typeof(IEventHandler))
.WithMetadata("Interfaces", typeof(StubEventHandler).GetInterfaces().ToLookup(i => i.Name, StringComparer.OrdinalIgnoreCase));
.Named(typeof(ITestEventHandler).Name, typeof(IEventHandler))
.Named(typeof(IEventHandler).Name, typeof(IEventHandler))
.WithMetadata("Interfaces", typeof(StubEventHandler).GetInterfaces().ToLookup(i => i.Name));
_container = builder.Build();
_eventBus = _container.Resolve<IEventBus>();