Esempio n. 1
0
 public O2Shell()
 {
     shellIO        = new ShellIO();
     shellExecution = new ShellExecution(shellIO);
     shellIO.writeLine("Welcome to O2's Kernel shell.\n");
     shellIO.writeLine("This is an interactive command prompt into O2's world\n");
     shellIO.writeLine("O2Kernel Process Name: {0}\n\n", PublicDI.O2KernelProcessName);
 }
Esempio n. 2
0
 public O2Shell()
 {
     shellIO = new ShellIO();
     shellExecution = new ShellExecution(shellIO);
     shellIO.writeLine("Welcome to O2's Kernel shell.\n");
     shellIO.writeLine("This is an interactive command prompt into O2's world\n");
     shellIO.writeLine("O2Kernel Process Name: {0}\n\n",PublicDI.O2KernelProcessName);
 }
        public bool execute(string cmdToExecute)
        {
            // _shellIO.write("\nExecuting: {0} \n\n", cmdToExecute);
            var shellCmdLet = resolveCmdToExecuteIntoShellCmdLet(cmdToExecute);

            if (shellCmdLet == null)
            {
                _shellIO.writeLine("Error: Could not resolve command: {0}", cmdToExecute);
            }
            else
            {
                execute(shellCmdLet);
            }
            return(true);
        }