I have the following problem:
I have some classes and interfaces in the first assembly:
public interface IA {}
public interface IB : IA {}
internal class C : IB {}
and class C is registered in the Unity container in this assembly.
Container.RegisterType<IB, C>();
and now I want to register something like
Container.RegisterType<IA, C>();
in the another assembly, but class C is not accessible. And
Container.RegisterType<IA, IB>();
does not work, because IB is interface.
How can I link base interface IA with already registered IB?
Thanks a lot!
You simply cannot use internal type inside another library but you can resolver IB so: