Example #1
0
        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());
        }
Example #2
0
        public int Execute()
        {
            try
            {
                Environment.SetEnvironmentVariable(TelemetrySessionIdEnvironmentVariableName, Telemetry.CurrentSessionId);

                return(_forwardingApp.Execute());
            }
            finally
            {
                Environment.SetEnvironmentVariable(TelemetrySessionIdEnvironmentVariableName, null);
            }
        }
Example #3
0
        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();
        }
Example #5
0
 public int Execute()
 {
     return(_forwardingApp.Execute());
 }