18 lines
448 B
C#
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;
|
|
}
|
|
}
|