I have a soap web service in my web layer (s#arp architecture) which uses a service like this:
public ReportWebService(IReportService ReportService)
{
Check.Require(ReportService != null, "ReportService may not be null");
this.ReportService = ReportService;
}
Can someone please remind me how/where I configure the injection of the implementation for IReportService again?
Thanks.
Christian
The short answer is: Just put ReportService into yourProject.ApplicationServices and it will be injected.
The long answer is: In yourProject.Web in Global.asax you will find the method InitializeServiceLocator(). This calls the static method AddComponents on ComponentRegistrar.
ComponentRegistrar is located in yourProject.web/CastleWindsor. In there you will find
If you look at AddApplicationServicesTo you can see that is registers all types in yourProject.ApplicationServices (.WithService.FirstInterface()):