cool!

just what I was looking for (anywhere but in the docs it seems ;))

thanks,
jan

2009/8/22 Jason Meckley <[email protected]>

>
> I just did something similar with arrays. here is the link
>
> http://www.castleproject.org/container/documentation/trunk/usersguide/arrayslistsanddicts.html
> parameters and ctor args are the same thing.
>
> On Aug 21, 4:01 pm, Jan Limpens <[email protected]> wrote:
> > 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
> >
>


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