Exemple #1
0
 /// <summary>
 /// Will invoke the Command Line Interface command with the given arguments.
 /// </summary>
 /// <param name="args">The arguments to feed this Command Line Interface command.</param>
 public void Execute(IList <string> args)
 {
     if (args.Count == 0)
     {
         // empty help request
         Console.WriteLine(Help);
     }
     else
     {
         var commArgs = CommandArguments.Create(args);
         var command  = commArgs.Command;
         if (command == "?")
         {
             command = "help";
         }
         var dude = CommandLineInterfaceHelper.GetCommandObject(command);
         if (dude != null)
         {
             Console.WriteLine(dude.Help);
         }
         // missing command object error handled in the GetCommandObject function
     }
 }
 private string Function(IList <string> args) => (new DataTable()).Compute(CommandLineInterfaceHelper.ConvertToString(args), "").ToString();