There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
[SimpleIoc] Add a way to invoke Dispose() on all created instances that dispose IDisposable
I have interfaces that may be implemented by classes that also implement IDisposable. Since I don't know which services actually implement it, I have to go manually over all registered instances, try to cast them and invoke the method. Since SimpleIoc
doesn't expose the list of all created/registered instances, it would be very convenient if at least it exposed a method that invokes Dispose() on all created instances that need it. That way I can call that method in my Cleanup() routine.