Providers should throw ActivationException

Jun 16, 2009 at 10:22 AM

All but one of the providers (MEF) don't catch their IOC's exception in case the requested object cannot be located! This requires the client to catch container-specific exception-types and thus defies the purpose of the CSL!

A bit more guidance in the interface/API would be recommended for future implementors ;)

Developer
Jul 20, 2009 at 6:47 AM

If the providers are implemented by deriving from the ServiceLocatorImplBase class, then they don't have to - the base class does the wrapping for them. I know this is how the Unity adapter works, anyway. I can't comment on the other, Microsoft Legal won't let me look at the code to the others.

 

Oct 3, 2010 at 6:55 AM
ctavares wrote:

, Microsoft Legal won't let me look at the code to the others.

 

 

Really?

Don't you find this ipossibley limiting?

Developer
Oct 7, 2010 at 4:56 PM

It's incredibly frustrating, yes.