Ejemplo n.º 1
0
 private void Execute(CliCommand cliCommand, Cmd cmd)
 {
     try
     {
         cliCommand.Execute(cmd);
     }
     catch (ArgumentError e)
     {
         clti.WriteError(e.Message);
         clti.WriteError(cliCommand.Help);
     }
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            if (args == null ||
                args.Length == 0)
            {
                return;
            }

            string     typeName   = string.Format("ConcurrentProgramming.CLI.{0}CliCommand", args[0]);
            CliCommand cliCommand = (CliCommand)Activator.CreateInstance(Type.GetType(typeName));

            cliCommand.Execute(args);

            Console.Read();
        }