AutoDI icon indicating copy to clipboard operation
AutoDI copied to clipboard

Add event to allow for handling the cases when a requested type is not matched

Open Keboo opened this issue 9 years ago • 2 comments

Currently the container simply returns default(T) when it is unable to locate a dependency.

The ContainerMap (also added to IContainer interface) should have an event that is raised when a service type key is not found to allow for a caller to either fill the dependency, log a failure message, or even throw an exception (if that is the desired behavior).

Keboo avatar Jul 14 '17 20:07 Keboo

Hi Keboo!

I just added event requested to the ContainerMap and the corresponding test for the event in ContainerMapTest. All test Passed.

MarsMSJ avatar Oct 13 '17 03:10 MarsMSJ

Fixed by #77

Keboo avatar Oct 13 '17 04:10 Keboo