AutoDI icon indicating copy to clipboard operation
AutoDI copied to clipboard

Validate registrations

Open Keboo opened this issue 5 years ago • 0 comments

In many cases AutoDI knows what is being registered, and knows what dependencies may be asked of it. It would be great if there was an opt-in warning for detecting when a dependent service may be used, but is not registered. I would imagine the logic would be something like:

  1. Iterate over all of the registered types and build a list of their dependencies
  2. For each of the dependencies ensure that there is a matching registration
  3. Display warnings for all dependencies that are not registered

Consider possibly checking the setup method as well, or at least allowing for a run-time method that can do the checks.

This would also require making this feature opt-in, as well as being able to ignore types.

Keboo avatar Apr 07 '21 20:04 Keboo