I tried posting this before, didn't seem to work. Sorry if you got it
twice.
It's in response to
http://groups.google.com/group/castle-project-users/browse_thread/thread/831d5862dccf13e2/4bd4dbaa051f7089?lnk=gst&q=IEnumerable#4bd4dbaa051f7089
I have the same problem. Here is a test to show the problem.
Is there away to acheive the same thing a different way?
[Test]
public void Bug()
{
WindsorContainer container = new WindsorContainer();
container.AddFacility<FactorySupportFacility>();
container.Register(Component.For<IService>
().ImplementedBy<Service1>().Named("1"));
container.Register(Component.For<IService>
().ImplementedBy<Service2>().Named("2"));
container.Register(Component.For<IEnumerable<IService>>
().UsingFactoryMethod(() => container.ResolveAll<IService>()));
container.Register(Component.For<Consumer>());
Assert.IsNotNull(container.Kernel.Resolve<Consumer>());
}
public class Consumer
{
public Consumer(IEnumerable<IService> services) { }
}
public class Service1 : IService
{
}
public class Service2 : IService
{
}
public interface IService { }
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---