This project is read-only.
The OpenNETCF.IoC Framework it is a public-domain-licensed (you can't get any more free and unencumbered than that) framework written in C# (framework version 3.5) that provides both inversion of control and dependency injection for applications running on any or all of the following platforms:

It's roughly modelled after Microsoft's SCSF and CAB frameworks, but it's scaled down and optimized for running on mobile and embedded devices, plus I "fixed" stuff that I think the SCSF got wrong (like having a static, globally available RootWorkItem and the ability to insert IMessageFilters into the application's message pump).

This framework is in use in several commercial applications (both desktop and CF) already, so it's been pretty heavily tested and vetted. I still want to add a few more features as well and go back through it looking for performance optimizations, but it certainly has enough features to be used in applications today.

This release also ships with a full-blown, real-world sample application, not just the typical "Northwind" type of application. The sample is called WiFiSurvey and it can be used to survey WiFi AP coverage of a site and to monitor associated AP changes as well as network addressability of a device.

WiFiSurvey has a Configuration service, a SQL CE 3.5-backed Data Access Layer, an Infrastructure module and a an application shell all of which are fully decoupled from one another and that are all loaded dynamically using an XML definition file. The shell makes use of both a DeckWorkspace and a TabWorkspace, showing you not just how to use them, but also how to create your own workspaces if need be.

The WiFiSurvey application has a single source base for all target platforms and has been tested on the following platforms:

ARM-based CE 6.0 with a 320x240 (landscape) display.
Pocket PC 2003 240x320 (portrait)
WinMo 5.0 240x320 (portrait and landscape)
The IoC framework has additionally been tested on x86-based CE 5.0 and CE 6.0 devices.

As a side note, the WiFiSurvey sample application is also a good example of using the OpenNETCF Smart Device Framework for getting wireless information.

The Basics

Dependency Injection
Event Aggregation
Model-View-Presenter/Controller Features



The OpenNETCF IoC Framework, for Singleton registration and resolution anyway, outperforms other popular IoC frameworks such as Ninject, Unity, Castle Windsor, Structure Map and AutoFac. For a brief overview of the performance differences, see the following blog entry:

Common Service Locator Adapter

As of version 1.0.9280, we also support an adapter for the Microsoft Patterns and Practices team's CommonServiceLocator project.
Download the adapter and tests for it over on the Downloads page.

Usage examples

We understand that we need to document the library better. One of the pitfalls of creating open source projects is that there are often more questions than the developers can answer and we have to decide whether time is better spent adding features or documenting. As an attempt to provide some developer help, below are links to real-world applications (where the source code is available) that use IoC that may be useful as implementation examples.

Last edited Dec 19, 2012 at 2:47 PM by ctacke, version 20