How can I use Unity with internal classes?
问题 I have a Web API application and am using Unity for dependency injection. The application uses a library containing an Interface IDoStuff and a class that implements the interface: internal interface IDoStuff { void DoSomething(); } internal class DoStuff : IDoStuff { public void DoSomething() { // Do some stuff } } The library also has an public class that needs to do stuff: public class NeedToDoStuff { private IDoStuff doStuff; public NeedToDoStuff() { this.doStuff = new DoStuff(); }