container.Register(
AllTypes.Pick().FromAssembly(typeof (UserRepository).Assembly)
.WithService.FirstInterface());
현재 인터페이스는 동일한 어셈블리에도 있지만 IUserRepository가 다른 어셈블리에서 제공되는 경우 위의 코드는 잘 작동합니다.두 개의 다른 어셈블리에서 성 윈저 자동 등록?
두 개의 다른 어셈블리에서 자동 등록이 가능합니까? 내가 여기서 뭔가를 놓치고 있니?
기본 클래스가 다른 인터페이스를 상속하는 경우이 사이트를 참조하십시오. http://blog.theagileworkshop.com/2009/06/09/extension-methods-we-use-for-auto -registration-in-castle-windsor/ – firefly