A month or so back p&p shipped Unity 1.2 a dependency injection container for .NET. Just in time for the gift giving season comes Unity for Silverlight! So if you want to use DI as part of your Silverlight application today you can.
The Unity Application Block (Unity) is a lightweight, extensible dependency injection container. This release of Unity is a port of Unity Application Block 1.2 to Microsoft Silverlight 2.0.
The following capabilities and packaging of the Unity container have been adjusted in this release:
- The single Microsoft.Practices.Unity.dll file in the Silverlight version contains all the classes from the three separate desktop DLLs. You only need to reference and deploy the one assembly in your Silverlight projects.
- Because of differences in the Silverlight security model, only public types can be created and injected by the container. The desktop version allows you to also inject internal types.
- XML configuration is not supported.
- The Unity interception mechanism is not supported.
- An updated quickstart is also included.