Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Implement the interface ISecondaryUnityInstaller and place your assembly into the bin directory. Services will automatically execute the Install method on your class during application startup.  We do not support file based configuration for the object graph at this time.  

When do I use it

Some areas of the framework require you to tell us about your implementations in order for them to be picked up and used by Aptify. The security framework and exception handling framework are managed this way. If you are not configuring in these areas you do not need to use DI. But you may find it useful as a means for limiting the scope of what you're changing in your system, or to increase the test-ability of your code. For example, if want to write a process component that calls a 3rd party service to obtain information, it would be useful to inject the object responsible for talking to the 3rd party service in the constructor. This allows you to place the component under test with a mocked 3rd party service object, and swap the mock out for the real service in production.

...