RhSolutions-AddIn/RhSolutions.AddIn/Tools/ToolFactory.cs
2023-04-14 08:08:46 +03:00

18 lines
448 B
C#

namespace RhSolutions.Tools;
internal class ToolFactory
{
public Tool GetTool(string toolName)
{
Tool tool = toolName switch
{
"export" => new ExportTool(),
"convert" => new ConvertTool(),
"merge" => new MergeTool(),
"dxfexport" => new DxfTool(),
_ => throw new Exception("Неизвестный инструмент"),
};
return tool;
}
}