My recent curiosity for some .NET IoC containers has led to me try my hand at writing one myself. Purely for practice and learning purposes.
Key features. Keeping it simple -
- Register providers - resolve an implementation for a requested type
- Fill constructor dependencies - use best suited constructor, else default
- Inject property dependencies - public writable properties
There is a glaring, although interesting bug - cyclic dependencies. Solving it would definitely toss simplicity of code out the window. But I guess it lends itself well to the learning process.
UPDATE: This is now averted. Please contribute if you know of a better way around this.