mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#19476: Event bus refactoring. Interface name matching should be case-sensitive.
Work Item: 19476 --HG-- branch : 1.x
This commit is contained in:
@@ -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>();
|
||||
|
Reference in New Issue
Block a user