A Custom IoC Container and DI Framework

The custom Dependency class is a static class used to associate types or resolve instances of types at runtime. The Dependency class serves as a proxy to an instance of IoC container, allowing you to change the underlying IoC container implementation. It does this by leveraging the Microsoft.Practices.ServiceLocation API, which provides a container agnostic type resolution mechanism. The Dependency class also uses a custom IDependencyRegistrar to create type associations, something notably absent from the Microsoft.Practices.ServiceLocation API.

To use the Dependency class, an IoC container implementation must be specified.

Initialization of the IoC infrastructure should be performed as soon as possible ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.