RhSolutions-AddIn/RhSolutions.AddIn/Tools/MergeTool.cs
2023-04-06 08:29:39 +03:00

24 lines
530 B
C#

#if !NET472
using System.Runtime.Versioning;
using RhSolutions;
using RhSolutions.Models;
using RhSolutions.Tools;
#endif
namespace RhSolutions.Tools;
#if !NET472
[SupportedOSPlatform("windows")]
#endif
internal class MergeTool : ToolBase
{
public override void Execute()
{
IFileDialog dialog = RhSolutionsAddIn.ServiceProvider.GetRequiredService<IFileDialog>();
string[] files = dialog.GetFiles();
var products = _reader.ReadProducts(files);
_writer.WriteProducts(products);
}
}