public int Execute() { // Ignore Ctrl-C for the remainder of the command's execution // Forwarding commands will just spawn the child process and exit Console.CancelKeyPress += (sender, e) => { e.Cancel = true; }; return(_forwardingApp.Execute()); }
public int Execute() { try { Environment.SetEnvironmentVariable(TelemetrySessionIdEnvironmentVariableName, Telemetry.CurrentSessionId); return(_forwardingApp.Execute()); } finally { Environment.SetEnvironmentVariable(TelemetrySessionIdEnvironmentVariableName, null); } }
private void AddProject(string slnPath, string csprojPath) { List<string> args = new List<string>() { "sln", slnPath, "add", csprojPath, }; var dotnetPath = Path.Combine(AppContext.BaseDirectory, "dotnet.dll"); var addCommand = new ForwardingApp(dotnetPath, args); addCommand.Execute(); }
private void RunDotnetSlnCommand(string slnPath, string projPath, string commandName) { var args = new List <string>() { "sln", slnPath, commandName, projPath, }; var dotnetPath = Path.Combine(AppContext.BaseDirectory, "dotnet.dll"); var command = new ForwardingApp(dotnetPath, args); command.Execute(); }
public int Execute() { return(_forwardingApp.Execute()); }