예제 #1
0
        private Command(CommandSpec commandSpec)
        {
            var psi = new ProcessStartInfo
            {
                FileName        = commandSpec.Path,
                Arguments       = commandSpec.Args,
                UseShellExecute = false
            };

            _process = new Process
            {
                StartInfo = psi
            };

            ResolutionStrategy = commandSpec.ResolutionStrategy;
        }
예제 #2
0
        private Command(CommandSpec commandSpec)
        {
            var psi = new ProcessStartInfo
            {
                FileName = commandSpec.Path,
                Arguments = commandSpec.Args,
                UseShellExecute = false
            };

            _process = new Process
            {
                StartInfo = psi
            };

            ResolutionStrategy = commandSpec.ResolutionStrategy;
        }
예제 #3
0
파일: Command.cs 프로젝트: swgillespie/cli
        private Command(CommandSpec commandSpec)
        {
            var psi = new ProcessStartInfo
            {
                FileName               = commandSpec.Path,
                Arguments              = commandSpec.Args,
                RedirectStandardError  = true,
                RedirectStandardOutput = true
            };

            _stdOut = new StreamForwarder();
            _stdErr = new StreamForwarder();

            _process = new Process
            {
                StartInfo = psi
            };

            ResolutionStrategy = commandSpec.ResolutionStrategy;
        }
예제 #4
0
파일: Command.cs 프로젝트: ericstj/cli
        private Command(CommandSpec commandSpec)
        {
            var psi = new ProcessStartInfo
            {
                FileName = commandSpec.Path,
                Arguments = commandSpec.Args,
                RedirectStandardError = true,
                RedirectStandardOutput = true
            };

            _stdOut = new StreamForwarder();
            _stdErr = new StreamForwarder();

            _process = new Process
            {
                StartInfo = psi
            };

            ResolutionStrategy = commandSpec.ResolutionStrategy;
        }
예제 #5
0
파일: Command.cs 프로젝트: konzeptzwei/cli
        private Command(CommandSpec commandSpec)
        {
            var psi = new ProcessStartInfo
            {
                FileName        = commandSpec.Path,
                Arguments       = commandSpec.Args,
                UseShellExecute = false
            };

            foreach (var environmentVariable in commandSpec.EnvironmentVariables)
            {
                if (!psi.Environment.ContainsKey(environmentVariable.Key))
                {
                    psi.Environment.Add(environmentVariable.Key, environmentVariable.Value);
                }
            }

            _process = new Process
            {
                StartInfo = psi
            };
        }
예제 #6
0
 public static Command Create(CommandSpec commandSpec)
 {
     return(new Command(commandSpec));
 }
예제 #7
0
파일: Command.cs 프로젝트: ericstj/cli
 public static Command Create(CommandSpec commandSpec)
 {
     return new Command(commandSpec);
 }