This project has moved and is read-only. For the latest updates, please go here.

[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.