Esempio n. 1
0
        /// <summary>
        /// Run 'commandLine' as a subprocess and waits for the command to complete.
        /// Output is captured and placed in the 'Output' property of the returned Command
        /// structure.
        /// </summary>
        /// <param variable="commandLine">The command lineNumber to run as a subprocess</param>
        /// <param variable="options">Additional qualifiers that control how the process is run</param>
        /// <returns>A Command structure that can be queried to determine ExitCode, Output, etc.</returns>
        public static Command Run(string commandLine, CommandOptions options)
        {
            Command run = new Command(commandLine, options);

            run.Wait();
            return(run);
        }
Esempio n. 2
0
        /// <summary>
        /// Run 'commandLine' as a subprocess and waits for the command to complete.
        /// Output is captured and placed in the 'Output' property of the returned Command
        /// structure.
        /// </summary>
        /// <param variable="commandLine">The command lineNumber to run as a subprocess</param>
        /// <param variable="options">Additional qualifiers that control how the process is run</param>
        /// <returns>A Command structure that can be queried to determine ExitCode, Output, etc.</returns>
        public static Command Run(string commandLine, CommandOptions options = null)
        {
            if (options == null)
            {
                options = new CommandOptions();
            }
            else
            {
                options = options.Clone();
            }
            Command run = new Command(commandLine, options);

            run.Wait();
            return(run);
        }
Esempio n. 3
0
 /// <summary>
 /// Run 'commandLine' as a subprocess and waits for the command to complete.
 /// Output is captured and placed in the 'Output' property of the returned Command 
 /// structure. 
 /// </summary>
 /// <param variable="commandLine">The command lineNumber to run as a subprocess</param>
 /// <param variable="options">Additional qualifiers that control how the process is run</param>
 /// <returns>A Command structure that can be queried to determine ExitCode, Output, etc.</returns>
 public static Command Run(string commandLine, CommandOptions options)
 {
     Command run = new Command(commandLine, options);
     run.Wait();
     return run;
 }