public AvrDudeBurningTool(string ChipPseudoname, IToolBody ToolBody, IToolLauncher ToolLauncher, IProgressControllerFactory ProgressControllerFactory, ProgrammerType ProgrammerKind) { _toolBody = ToolBody; _toolLauncher = ToolLauncher; _progressControllerFactory = ProgressControllerFactory; _programmerKind = ProgrammerKind; _chipPseudoname = ChipPseudoname; }
/// <summary>Запускает программатор с указанными параметрами и возвращает поток вывода на консоль</summary> /// <param name="ToolBody">Место хранения файлов программатора</param> /// <param name="Parameters">Параметры для запуска программатора</param> /// <returns>Поток, который программатор выводит на консоль</returns> public Process Execute(IToolBody ToolBody, ICollection<ILaunchParameter> Parameters) { var processStartInfo = new ProcessStartInfo(ToolBody.ExecutableFilePath, string.Join(" ", Parameters.Select(prm => prm.GetStringPresentation()))) { WorkingDirectory = ToolBody.WorkingDirectoryPath, UseShellExecute = false, RedirectStandardOutput = true, RedirectStandardError = true, RedirectStandardInput = true, CreateNoWindow = true }; var p = new Process { StartInfo = processStartInfo }; try { p.Start(); } catch (Win32Exception e) { throw new ExternalToolLaunchException(ToolBody.ExecutableFilePath, ToolBody.WorkingDirectoryPath, Parameters, e); } return p; }
private ChmodTool(IToolLauncher ToolLauncher, IToolBody ToolBody) { _toolLauncher = ToolLauncher; _toolBody = ToolBody; }
private MkYaffs2Tool(IToolLauncher ToolLauncher, IToolBody Mkyaffs2Body) { _mkyaffs2Body = Mkyaffs2Body; _toolLauncher = ToolLauncher; }
public SambaBurningTool(IToolLauncher ToolLauncher, IToolBody ToolBody, ProgressControllerFactory ProgressControllerFactory) { _toolLauncher = ToolLauncher; _toolBody = ToolBody; _progressControllerFactory = ProgressControllerFactory; }
public OpenOcdTool(IToolBody ToolBody, IToolLauncher Launcher, string ProgrammerName) { _toolBody = ToolBody; _launcher = Launcher; _programmerName = ProgrammerName; }
/// <summary>Запускает программатор с указанными параметрами и возвращает поток вывода на консоль</summary> /// <param name="Launcher">Лаунчер</param> /// <param name="ToolBody">Место хранения файлов программатора</param> /// <param name="Parameters">Параметры для запуска программатора</param> /// <returns>Информация о процессе выполнения утилиты</returns> public static Process Execute(this IToolLauncher Launcher, IToolBody ToolBody, params ILaunchParameter[] Parameters) { return Launcher.Execute(ToolBody, Parameters); }
public Stk500BurningTool(string ChipName, IToolBody ToolBody, IToolLauncher ToolLauncher) { _chipName = ChipName; _toolBody = ToolBody; _toolLauncher = ToolLauncher; }