With the release of the beta of Unity 2.0, I took a quick look at the new/changed features.
Things I’ve noticed:
- The objectbuilder is gone: The dependency on the ObjectBuilder2 assembly is removed and most of the code is now incorporated in the core assembly.
- Configuration support: Unity configuration can be done using the Enterprise Library configuration tool.
- IsRegistered extension method: Checks if a type is already registered in the container. Can be useful in some situations where you want to avoid multiple registrations overriding each other.
- Registrations collection: Similar to the diagnostics feature in StructureMap, you can now inspect the available registrations.
- New lifetime managers: HierarchicalLifetimeManager and PerResolveLifetimeManager are added.
In a future post I look into more detail in some of this features. I especially hope to find some improvements in passing arguments when resolving types.