2

I'm accustomed to using Autofac and with autofac with one line of code I can register all the interfaces in the assembly so that they resolve to whatever classes implement that interface.

In Unity it's looking like I need to register every interface manually. I'm wondering if there is a simpler way to globally register everything, then for lifecycle differences create individual entries.

thanks

Steven
  • 166,672
  • 24
  • 332
  • 435
Honorable Chow
  • 3,097
  • 3
  • 22
  • 22

2 Answers2

2

There isn't in Unity 2.

There are however contrib projects that try to add this behavior on top of Unity, such as:

UPDATE

Unity 3 seems to be just released that contains support for batch-registration.

Steven
  • 166,672
  • 24
  • 332
  • 435
1

Unity 3 now supports auto-registration.

Isaac Abraham
  • 3,422
  • 2
  • 23
  • 26