This was fixed in r5927, included in the 2.1.1 release. Try upgrading
and let us know.

Cheers,
Mauricio

On Feb 23, 4:43 am, Maciej Paszta <[email protected]> wrote:
> On 2010-02-23 08:27, Maciej Paszta wrote:
>
> > private static void Main (string[] args)
> > {
> > WindsorContainer c = new WindsorContainer ();
> > c.AddFacility<FactorySupportFacility> ();
> > c.Register (Component.For<IService> ()
> > .ImplementedBy<Foo> ()
> > .Named ("foo.implementation")
> > .UsingFactoryMethod (() => new Foo ()),
> > Component.For<IService> ()
> > .ImplementedBy<Bar> ()
> > .Named ("boo.implementation")
> > .UsingFactoryMethod (() => new Foo ())
> > );
>
> Argh!!! My bad, should be Bar here - this would work. Nevertheless, the
> problem remains. I have a method (dynamic method) which is built in
> runtime and returns instances of the service that I'm registering (hence
> is compiled to delegate  - IService CreateProxyForService()). The method
> itself returns specific instance of the IService, but since call to
> UsingFactoryMethod registers GenericFactory<T> under it's full name, the
> key in the container will be the same for several implementations
> (GenericFactory[IService,foo].....). Of course custom component
> activator resolves this constraint, but is it really necessary to
> register factories under their qualified name, what if GenericFactory
> could return types of S not T?
>
>  smime.p7s
> 7KViewDownload

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