Recommended approach in registration facilities

8 views
Skip to first unread message

Dmitry Kryuchkov

unread,
Aug 4, 2011, 5:41:28 AM8/4/11
to Castle Project Users
Hi guys!

What is recommended way to register facilities in Castle.Windsor?
I used to use FacilitiesInstaller to do it, but registration order
matters for WcfFacility - client must be registered AFTER facility
registration.

So, is it issue in WcfFacility or there is another recommended
approach in registration facilities?

Jason Meckley

unread,
Aug 4, 2011, 12:56:25 PM8/4/11
to castle-pro...@googlegroups.com
placed the facility and dependent components into a single installer.
container.AddFacility<TheFacility>().Register(AllTypes.From...);

this will work better than trying to place all the facilities in one installer and all the components in another.

Dmitry Kryuchkov

unread,
Aug 5, 2011, 6:37:07 AM8/5/11
to Castle Project Users
But what to do if same facility is used by several components from
different groups?

Jason Meckley

unread,
Aug 5, 2011, 3:39:44 PM8/5/11
to castle-pro...@googlegroups.com
check to see if the facility is already registered. I think in future versions this won't be required, but for now you can only register a facility once.
Reply all
Reply to author
Forward
0 new messages