Technically there's nothing to stop you from doing that but you would have 
built yourself a service locator.

The whole idea of using typed factories is so that you have a meaningful 
context specific factory rather than a generic service locator. 

-- 
Krzysztof Kozmic


On Saturday, 2 February 2013 at 7:11 AM, Scott_M wrote:

> Was curious if it was feasible to have one generic factory interface for all 
> Windsor Typed Factory use cases.  Example:
> 
> public interface IFactory<T> : where T: class
> {
>    T Get(); //Caller needs to resolve a single factory component
>    T[] GetAll();  //Caller needs to resolve all factory components
>    T Get(string componentId); //Caller needs to resolve a single factory 
> component by component Id
> }
> 
> Is this feasible in Windsor or do I need to bust this out into three separate 
> factories (one for each Get method)?
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Castle Project Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> (mailto:[email protected]).
> To post to this group, send email to [email protected] 
> (mailto:[email protected]).
> Visit this group at http://groups.google.com/group/castle-project-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/castle-project-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to