Castle Facility using non default constructor in registration
I am trying to register a facility in Castle Windsor using the fluent apis (version 2.5.1). I am also trying to use a non default constructor (one that takes parameters). My current code looks like this:
IWindsorConatiner c= new 开发者_StackOverflowContainer();
c.AddFacility<NHibernateFacility>();
The NHibernateFacility has another constructor, how do I tell Castle to use it instead?
/Konstantin
c.AddFacility("nh", new NHibernateFacility(...));
where "nh" is the id of the facility in the config.
精彩评论