Closed xp-development closed 6 years ago
Cannot locate object by key and generic.
[Fact] public void KeyedWithGeneric() { var container = new DependencyInjectionContainer(); container.Configure(c => { c.Export(typeof(ImportGenericService<>)).AsKeyed(typeof(IImportGenericService<>), "A"); c.Export<BasicService>().As<IBasicService>(); }); var service = container.Locate<IImportGenericService<IBasicService>>(withKey: "A"); Assert.NotNull(service); Assert.NotNull(service.Value); Assert.IsType<BasicService>(service.Value); }
Sorry about that, I've committed a fix to the dev branch for this and will look to do a release in the coming days.
This is released in 6.3.1
Cannot locate object by key and generic.