Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
        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;
        }
Ejemplo n.º 5
0
        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
            };
        }
Ejemplo n.º 6
0
 public static Command Create(CommandSpec commandSpec)
 {
     return(new Command(commandSpec));
 }
Ejemplo n.º 7
0
 public static Command Create(CommandSpec commandSpec)
 {
     return new Command(commandSpec);
 }