CompactContainer new features

Last week I've found this post, in which Jeff Doolittle made an analysis of some alternatives about using dependency injection with the .NET Compact Framework.

As I've faced the same decision some time ago and ended rolling out my own solution, I pointed him to CompactContainer.

Apparently he likes the project but needs some features not implemented at the time. He sent me some patches and in the end we've added the following features to CompactContainer.

Attribute to mark the injectable constructor

By default, the container uses the constructor with most satisfiable (I think that's not a word...) dependencies to instantiate each component. This is the default behavior of Windsor/Microkernel.

Now, we have created an extension point where the default IHandler (responsible of creation and initialization of each component) can be specified and we've created an AttributedHandler that allows to select which constructor to use by means of an attribute.

The attribute type could be specified by the user when creating the AttributedHandler.