Does unity just make clasess with out needing anything registered?

前端 未结 2 1147
逝去的感伤
逝去的感伤 2021-01-24 09:34

I am watching Mike Tautly\'s awesome intro to Prism. It was all making sense, but I got a bit confused in the sixth video.

He has his view class\'s constructor take a p

2条回答
  •  旧时难觅i
    2021-01-24 09:58

    When a type can be instantiated (i.e. not a base class nor an interface) unity can figure out how that type is created without the need of registering a type mapping.

    Mappings are useful when the type to be injected is not instantiatable on its own.

    I hope this helps.

    Thanks, Damian

提交回复
热议问题