I wouldn't add one facility inside of another. rather make this part of the
documentation. Facility A also requires Facility B to function properly.
Another option; have the additional facility be a configurable option
container.AddFacility<MyFacility>(f=>f.IncludeTypedFactoryFacility());
class MyFacility : Abstract Facility
{
bool includeTypedFactoryFacility;
public void IncludeTypedFactoryFacility()
{
includeTypedFactoryFacility = true;
}
protected override void Init()
{
if(includeTypedFactoryFacility)
{
kernel.AddFacility<TypedFactoryFacility>();
}
//register my components.
}
}
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.