...
Note |
---|
Note that the Catel team recommends using constructor injection over property injection because it allows . Property injection looks like a silver bullet, but is very tricky because: 1) It does not allow you to check for null values and store dependencies in private fields (when)? 2) Dependency Injection is just a technique. When using a constructor, you can force a user to provide the value. With property injection, you can only hope that the user will set them for you |
To use property injection, simply decorate the properties of a class with theĀ Inject attribute. Below are several options:
...