"I wouldn't add one facility inside of another"

Why not? Just curious.

Context: This is a part of an internal support framework, one of the goals
is to decrease the amount of moving pieces for our developers.

-d



On Mon, Jan 31, 2011 at 1:29 PM, Jason Meckley <[email protected]>wrote:

> 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]<castle-project-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
>

-- 
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.

Reply via email to