0
我有通用接口的简单refistatiion统一DI。泛型类型注册和IsRegistered方法
unityContainer.RegisterType(typeof(IMyInterface<>), typeof(MyClass<>));
它容易使解决上unityContainer.Resolve<IMyInterface<MyGenericType>>
MyClass<MyGenericType>
和它的作品。
然而unityContainer.IsRegistered<IMyInterface<MyGenericType>>()
是False
的问题是:1。 为什么? 2.如何检查unityContainer.Resolve<IMyInterface<MyGenericType>>
是否可能?