InfinityMQ/InfinityMQ — comment on commit a91a0b4607c83cfd3363add680f4c6f2c1fcd95a
File: src/Core/Channels/Endpoints/EndpointBase.cs line 38
By CaptainCodeman:

From a purist point of view, you are correct - it's the implementation that may or may not hold resourced and so would implement IDisposable and not the interface.

However, this then means you can't handle all the implementations the same way which then becomes a worse compromise than putting it on the interface.

I believe the pragmatic approach and precedent set by the framework (e.g. Stream/MemoryStream implementation) is to put the IDisposable on the interface because it's a special 'JFK case'* and it's better for the caller to use things (via the interface) in the same consistent way than having to start examining how to use each one.

* "Ask not what your interface implementation can do for you, ask what you must do for your interface implementation"