I found that for implementation of IDisposable interface Visual Studio 2019 suggests two possible fixes:
Is it possible to create a custom interface with an o