Hi,
The API currently supports pulling by type using GetObjectsByType but adding generics and having a convenience method for the case when there will be just one of that type registered with the container should also be added, i.e. GetObjectByType. (If more than one type is found then an exception is thrown.)
Mark
----- Original Message -----
From: "Erich Eichinger" <E.E...@di...>
To: "springnet-developer" <spr...@li...>
Sent: Thursday, December 13, 2007 1:39:05 PM (GMT-0500) America/New_York
Subject: [Springnet-developer] IServiceProvider adapter for ApplicationContexts?
Hi all,
It just came to my mind, that this might be a good idea for better integrating Spring with IServiceProvider-based frameworks/applications (like WF).
I added it to JIRA here: http://opensource.atlassian.com/projects/spring/browse/SPRNET-817
There have been a couple of requests on the forum like "Why can't Spring do 'ctx.GetObject<SomeType>()'" and do some 'pull by-type wiring'. It's not my prefered why of using an IoC container, but since a lot of applications and frameworks out there are using IServiceProvider (or something similar), I think it would be a good idea to provide an adapter for this.
What do you think?
cheers,
Erich
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Springnet-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springnet-developer
|