GetArguments() public method

public GetArguments ( IEnumerable commandArgs ) : string[]
commandArgs IEnumerable
return string[]
示例#1
0
 public static void Main(string[] args)
 {
     Bootstrapper.Initialize();
     args = Bootstrapper.Settings.Parse(args);
     if (args.Length == 0)
     {
         printUsage();
         return;
     }
     var execute = Bootstrapper.GetDispatcher();
     var parser = new CommandStringParser();
     execute.For(
         parser.GetCommand(args),
         parser.GetArguments(args));
 }
示例#2
0
 private void dispatchMessage(string command)
 {
     if (command.Length == 0)
         return;
     var parser = new CommandStringParser();
     var args = parser.Parse(command);
     if (isError(command))
     {
         printError(command);
         return;
     }
     if (isComment(command))
     {
         printComment(command);
         return;
     }
     _dispatcher.For(
         parser.GetCommand(args),
         parser.GetArguments(args));
 }