Unity 1.2 is Available
In case you haven't seen the news yet with all the other PDC hoohah about Windows 7 and Azure going on, Unity 1.2 (and EntLib 4.1) were released today. You can get all the bits you need from www.codeplex.com/unity.
Here's a quick "What's New" as far as Unity is concerned (stolen from Grigori's blog):
- Added an interception mechanism (extension);
- Added two instance interceptors (TransparentProxyInterceptor, InterfaceInterceptor) and one type interceptor (VirtualMethodInterceptor);
- Improved support for generics;
- Added support for arrays;
- Registered names are now available as an ObjectBuilder policy so that you can do a ResolveAll from within the strategy chain. The container automatically registers itself with itself;
- Added PerThreadLifeTimeManager;
- Bug fixes;
- Performance improvements.
The best thing has to be the Aspect Oriented Programming (AOP) support that is now available with the inclusion of interceptors. Awesome! You can use interceptors either with the EntLib Policy Injection Application Block and/or you can roll your own.
I haven't had time to play with it yet but the syntax for creating custom interceptors looks very similar the way the other IoC containers implement interceptors which should make transitioning between them fairly simple.
The new per thread lifetime manager is something that should have been in the 1.1 release so it's a very welcome inclusion. Now we have a way to ensure that we won't get objects created by other threads when we call Resolve<T>() (think web applications, etc).
Documentation has also been added to MSDN so go have a look and see how some of this stuff works.