Disposal of classes and used objects seems to be a mess. Especially if we want to make the library DI friendly, we should properly document proposed lifetimes of all classes and implement IDisposable on classes that directly own references to unmanaged resources. Moreover we should not implement or call IDisposable on anything that can or will be managed by a DI container. IT's all about inversion of control, so disposal is a task of the container.
Disposal of classes and used objects seems to be a mess. Especially if we want to make the library DI friendly, we should properly document proposed lifetimes of all classes and implement IDisposable on classes that directly own references to unmanaged resources. Moreover we should not implement or call IDisposable on anything that can or will be managed by a DI container. IT's all about inversion of control, so disposal is a task of the container.