ObjectMap - Reinventing the wheel (learning by synthesis)


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.

Enter, ObjectMap.

Key features. Keeping it simple -
  1. Register providers - resolve an implementation for a requested type
  2. Fill constructor dependencies - use best suited constructor, else default
  3. 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.

comments powered by Disqus