blob: 8b746df28928bf6dc45bb10cdb78bf1e344215e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
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;
}
}
|