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