I've been defining some interfaces for some classes in our code.  The classes implement IDisposable and I was wondering whether the class' corresponding interface should also derive from IDisposable.

For example:

class Foo : IFoo, IDisposable
    public void Bar() { }
    public void Dispose() { }

interface IFoo
    void Bar();

The question is: should IFoo derive from IDisposable?  My co-worker and I both decided that it should not.  Our reasoning was that the dispose implementation should only exist if the class required it.  Since the interface can have varying implementations, it is up to the class to define whether it implements IDisposable.  The IDisposable interface doesn't really contribute to contract of the interface; it's purely an implementation detail that should not be exposed at that level.

Unfortunately, this requires that consuming code check whether the object implements IDisposable if they want to dispose of it:

IFoo foo = ...;
IDisposable disposableFoo = foo as IDisposable;
if (disposableFoo != null)

What are your thoughts?  Do you agree?