public ITask Execute(Action <ILRepackMergeParameters> parameters) { return(new ILRepackMergeTask(() => { ILRepackMergeParameters instance = new ILRepackMergeParameters { Path = Bob.ILRepack.Path.Package() }; parameters(instance); return instance; })); }
private TaskResult Execute(ILRepackMergeParameters data) { StringBuilder arguments = new StringBuilder(); string tool = data.Path.Resolve(); if (data.Output != null) { arguments.Append("/out:"); arguments.Append(data.Output.Execute().Single().Quote()); arguments.Append(" "); } if (data.Primary != null) { arguments.Append(data.Primary.Execute().Single().Quote()); arguments.Append(" "); } foreach (string assembly in data.Assemblies.Execute()) { arguments.Append(assembly.Quote()); arguments.Append(" "); } ProcessStartInfo info = new ProcessStartInfo { FileName = tool, WorkingDirectory = Container.Storage.Local.Path, Arguments = arguments.ToString().TrimEnd() }; if (Container.Shell.Start(info) != 0) { return(TaskResult.Unsuccessful); } return(TaskResult.Successful); }