I am trying to build a framework of objects where the main actors can be interchanged freely. At the moment I've done this by creating an abstract base class that all of my actors can be derived from. A key reason for using an abstract class over an interface was there there is a very small bit of common code that all of the derived classes should be using.
My goal is to make a system that can be easily extended by other developers (one day) that shares some common logic and the derived objects can be seamlessly interchanged.
I've had a few issues with the way I've designed the system. One being that it hasn't been easy to test consumers of my framework. But the one I'm most interested in solving at the moment is that some of the derived classes need to implement IDisposable because they contain objects which need to be disposed.
The best solution I've found at the moment is to have the abstract class implement IDisposable even though it doesn't require it and some of the other derived classes don't either. I realize I have some fundamental issues with the way I've modelled my objects and I'm trying to work out the best way to do it.
However, I'm still curious what is the best way to conditionally implement IDisposable? Or do I just have a serious design issue that needs to get sorted out instead and I'm trying to solve a problem that will no longer be an issue with the correct model?