I wonder how one would tell this in xml?

            Container.Register(
                Component.For<IEnumerable<IFreightCalculator>>().Instance(
                    new List<IFreightCalculator>
                    {
                        new SedexFreightCalculator("sedex", "sedexs",
"bla"),
                        new PacFreightCalculator("pac", "pacs", "bla"),
                    }));

Does not have to be exactly like that, but you get the drift....

Because, currently, whenever I need a list of services, I used to create a
listresolver for that interface, that would take the kernel as and ctor
param and then return the list of services with ResolveAll<T>(). But this
couples my services to the container which is not nice and spams my
namespaces.

-- 
Jan

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