namespace RhSolutions.Tools; internal abstract class ReaderWriterTool: IDisposable { protected IReader _reader; protected IWriter _writer; protected ReaderFactory _readerFactory = RhSolutionsAddIn.ServiceProvider.GetService(); protected WriterFactory _writerFactory = RhSolutionsAddIn.ServiceProvider.GetService(); public void Dispose() { _reader?.Dispose(); _writer?.Dispose(); } }