namespace RhSolutions.Tools; internal class MergeTool : ReaderWriterTool, ITool { public void Execute() { IFileDialog dialog = RhSolutionsAddIn.ServiceProvider.GetRequiredService(); string[] files = dialog.GetFiles(); if (files.Length > 0) { _reader = _readerFactory.GetReader("Excel"); var products = _reader.ReadProducts(files); _writer = _writerFactory.GetWriter("NewPrice"); _writer.WriteProducts(products); } } }