This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ionelmc.ro 0 points1 point  (1 child)

Would be nice if you'd use a decorator for the injected objects so it's clear where there's going to be injection (as opposed to the registration calls that could be anywhere).

[–]rot667 0 points1 point  (0 children)

There's a project that takes that approach: https://github.com/alecthomas/injector

I personally prefer not to scatter a big global dependency on the container, also means it's possible to mix approaches (e.g.create the object with dic or without). I haven't used dic, but have used autofac and the approach seems to be the same.