Exemplo n.º 1
0
        public static void RunCommands(IEnumerable <string> commands,
                                       out string output)
        {
            CommandPromptListener listener = new CommandPromptListener();

            RunCommands(Directory.GetCurrentDirectory(),
                        commands,
                        listener.DataReceived_EventHandler,
                        listener.DataReceived_EventHandler);

            output = listener.Data;
        }
Exemplo n.º 2
0
        public static void RunCommands(string currentWorkingDirectory,
                                       IEnumerable <string> commands,
                                       out string output)
        {
            CommandPromptListener listener = new CommandPromptListener();

            RunCommands(currentWorkingDirectory,
                        commands,
                        listener.DataReceived_EventHandler,
                        listener.DataReceived_EventHandler);

            output = listener.Data;
        }