namespace RhSolutions.Tools; internal class ToolFactory { public ITool GetTool(string toolName) { return toolName switch { "export" => new ExportTool(), "convert" => new ConvertTool(), "merge" => new MergeTool(), "dxfexport" => new DxfTool(), "guess" => new GuessTool(), "fillsleeves" => new FittingsTool("Sleeves"), "fillcouplings" => new FittingsTool("Couplings"), "ocr" => new OcrTool(), _ => throw new Exception($"Неизвестный инструмент {toolName}"), }; } }